class properties in c++

David Demland plug-devel@lists.PLUG.phoenix.az.us
Wed Jun 13 12:19:01 2001


First of all it is not a function, it is a method. A function is part of
structural programming where a method is part of object oriented. This is
because functions live in libraries and methods live in objects. Second,
naming is for your internal coding standards to dictate. But in many shops I
have been around we use a get and set prefix. More and more shops are using
proper case for this. For example:

GetMyValue();
SetYourValue();

In "Code Complete" by Steve McConnell there is a great chapter on how and
why to name variables in the proper case. It is worth while to understand
what studies have shown before you go down a path.

That's my two cents.

Thank You,

David Demland
Qa/Process Manager
CADTEL Systems, Inc.
11201 N. Tatum Ste. 200
Phoenix, AZ 85028
(602) 648-6054
Fax: (602) 953-4833
ddemland@cadtel.com

-----Original Message-----
From: plug-devel-admin@lists.PLUG.phoenix.az.us
[mailto:plug-devel-admin@lists.PLUG.phoenix.az.us]On Behalf Of Lucas
Vogel
Sent: Thursday, June 14, 2001 2:23 PM
To: Plug-Devel (E-mail)
Subject: class properties in c++


If you are adding properties to a class, what is the common function format
in doing so? Do you use a get_/put_ prefix? What is the common practice?

Thanks
_______________________________________________
PLUG-devel mailing list  -  PLUG-devel@lists.PLUG.phoenix.az.us
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-devel