Module: DB Interface Module Group: Utility and Diagnostics Classes
RWDBRow RWCollectable
#include <rw/db/row.h> RWDBRow& r = myMemTable[i];
RWDBRow is an ordered collection of RWDBValues. RWDBRow is a relatively low level construct used by the DB Interface Module to store a row of data on its way to or from the database. It is visible to applications for two reasons:
An RWDBRow is a single row of an RWDBMemTable.
Some applications may want to manage raw data without knowing anything about its structure. RWDBRow can be used as a container in these cases.
The only semantics that RWDBRow adds to RWCollectable are:
The index operators [] return RWDBValue&, rather than RWCollectable*&.
The destructor deallocates the contents of the RWDBRow by calling clearAndDestroy().
RWDBRow is designed around the Interface/Implementation paradigm. An RWDBRow instance is an interface to a reference-counted implementation; copy constructors and assignment operators produce additional references to a shared implementation.
RWDBRow();
The default constructor produces an empty RWDBRow.
RWDBRow(const RWDBRow& rvalue);
Copy constructor. The created RWDBRow shares an implementation with rvalue.
virtual ~RWDBRow();
The default destructor.
RWDBRow& operator=(const RWDBRow& rvalue);
Assignment operator.
RWDBValue& operator[](size_t index) const;
Returns a reference to the RWDBValue at position index in the collection. An exception of type RWBoundsErr is thrown if index is out of range.
virtual void append(const RWDBValue& value);
Appends value to self.
virtual size_t entries();
Returns the total number of values in the collection.
virtual void clearAndDestroy();
Removes all values from the collection and deletes them.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.