operator<<() for VVContact
The purpose of this overloaded function is to ease the insertion of a VVContact instance into an RWDBInserter instance. The function combines the shifting of the individual components of a VVContact into a single function.
 
RWDBInserter&
operator<< (RWDBInserter& aInserter,
const VVContact& aContact) //1
{
aInserter << aContact.name() << aContact.id()
<< aContact.address() << aContact.city()
<< aContact.state() << aContact.zip()
<< aContact.phone(); //2
aInserter.execute(); //3
 
return aInserter;
}
//1 This line defines the overloaded left shift function for RWDBInserter and VVContact.
//2 This line shifts the individual components of a VVContact instance into an RWDBInserter instance. Each left shift is an invocation of a member function of RWDBInserter. The inserter class overloads the operator<<() for each of the basic C++ types along with several of the Rogue Wave types, such as RWCString.
//3 Shifting values into an inserter does not automatically insert the data into a table. The execute() member function of RWDBInserter actually sends the new data to the database.