Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

2.6 Information Flow

With the Rogue Wave libraries, information generally flows into a function via its arguments and out through a return value. Most functions do not modify their arguments. Indeed, if an argument is passed by value or as a const reference:

void  foo(const RWCString& a)

you can be confident that the argument will not be modified. However, if an argument is passed as a non-const reference, you may find that the function will modify it.

If an argument is passed in as a pointer, there is the strong possibility that the function will retain a copy of the pointer. This is typical of the collection classes:

RWOrdered::insert(RWCollectable*);

The function retains a copy of the pointer to remind you that the collection will be retaining a pointer to the object after the function returns[1].


Previous fileTop of documentContentsIndexNext file
©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.