Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

3.3 Member Function Conventions

The names of the member functions of the DBTools.h++ classes follow certain conventions.

Finally, we have freely overloaded the extraction, or shift-out operator >>, and the insertion or shift-in operator <<. The insertion operator is used to add elements to objects sequentially; the extraction operator is used to remove elements from objects sequentially. Assume we have a parts table in a database, with columns partID, partName, and supplier, and the following piece of SQL code:

The following example implements this SQL code fragment in DBTools.h++ code, then prints the results. Notice how the insertion and extraction operators are used on //1 and //2.

The insertion operators on //1 add parts.partID and parts.partName to the select list of the selector. The extraction operators on //2 take results from the reader and assign them to the local variables partID and partName.



Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.