Information flow – HP Integrity NonStop J-Series User Manual
Page 36

Click on the banner to return to the user guide home page.
©Copyright 1996 Rogue Wave Software
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]
.