[Uml-devel] [Bug 60452] missing keywords for declaring operations and variables
mtdean at hotmail.com
Fri Jul 4 13:47:08 UTC 2003
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
------- Additional Comments From mtdean at hotmail.com 2003-07-04 22:45 -------
virtual is for poly-morphism, as I'm sure you're all aware.
const can be used more than one might realize:
const Object * pointer; // points to const object
Object * const pointer; // const pointer
const Object * const pointer; // const pointer to const object
volatile // C++'s recognition of threads; tells compiler not to cache
// the volatile data type's value, to prevent thread A from
// reading an obsolete value (the value it was before it was
// changed by thread B, but hasn't yet been written back to
// the cached area of memory yet). Keeps the value in physical
// memory instead of caching it in a register
register // for optimization; tells compiler this variable is to be used
// often, keep it in a register. If overused, can actually
// degrade performance, but if used thoughtfully, can help
implicit // default for functions; opposite of explicit; rarely used
explicit // tells the compiler that, say, a user defined type conversion
// must be explicitly called upon:
int a = MyInt( b );
// instead of
int a = b; // implicit conversion form
friend // allows a friend class to access its "friend's" classes members
inline // optimization I'm sure you all know
unsigned // again, obvious
Just thought I'd fill you in on the blanks for whichever ones you didn't know.
Thanks for assigning this.
More information about the umbrello-devel