SourcePro® API Reference Guide

 
List of all members | Public Member Functions

An ordered collection of RWDBValue instances. More...

#include <rw/db/row.h>

Inheritance diagram for RWDBRow:
RWCollectable

Public Member Functions

 RWDBRow ()
 
 RWDBRow (const RWDBRow &rvalue)
 
virtual ~RWDBRow ()
 
virtual void append (const RWDBValue &value)
 
RWspace binaryStoreSize () const
 
virtual void clearAndDestroy ()
 
virtual int compareTo (const RWCollectable *c) const
 
virtual RWCollectablecopy () const
 
virtual size_t entries () const
 
virtual unsigned hash () const
 
virtual RWClassID isA () const
 
virtual bool isEqual (const RWCollectable *c) const
 
virtual RWCollectablenewSpecies () const
 
RWDBRowoperator= (const RWDBRow &rvalue)
 
RWDBValueoperator[] (size_t index) const
 
virtual void restoreGuts (RWFile &file)
 
virtual void restoreGuts (RWvistream &stream)
 
virtual void saveGuts (RWFile &file) const
 
virtual void saveGuts (RWvostream &stream) const
 
- Public Member Functions inherited from RWCollectable
virtual ~RWCollectable ()
 
RWspace recursiveStoreSize () const
 
RWStringID stringID () const
 

Additional Inherited Members

- Static Public Member Functions inherited from RWCollectable
static RWClassID classID (const RWStringID &name)
 
static RWClassID classIsA ()
 
static bool isAtom (RWClassID id)
 
static RWspace nilStoreSize ()
 

Detailed Description

RWDBRow is an ordered collection of RWDBValue objects. 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:

The only semantics that RWDBRow adds to RWCollectable are:

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.

Synopsis
#include <rw/db/row.h>
RWDBRow& r = myMemTable[i];

Constructor & Destructor Documentation

RWDBRow::RWDBRow ( )

The default constructor produces an empty RWDBRow.

RWDBRow::RWDBRow ( const RWDBRow rvalue)

Copy constructor. The created RWDBRow shares an implementation with rvalue.

virtual RWDBRow::~RWDBRow ( )
virtual

The default destructor.

Member Function Documentation

virtual void RWDBRow::append ( const RWDBValue value)
virtual

Appends value to self.

RWspace RWDBRow::binaryStoreSize ( ) const
virtual

Returns the number of bytes required to store self.

Reimplemented from RWCollectable.

virtual void RWDBRow::clearAndDestroy ( )
virtual

Removes all values from the collection and deletes them.

virtual int RWDBRow::compareTo ( const RWCollectable c) const
virtual

If c points to an RWDBRow, returns 0 if each RWDBValue in self compares equal to the RWDBValue in c at the same position, otherwise returns a nonzero value.

Reimplemented from RWCollectable.

virtual RWCollectable* RWDBRow::copy ( ) const
virtual

Returns a new, copy-constructed object of the same type as self. The caller is responsible for deleting the object.

Reimplemented from RWCollectable.

virtual size_t RWDBRow::entries ( ) const
virtual

Returns the total number of values in the collection.

virtual unsigned RWDBRow::hash ( ) const
virtual

Returns a hash value for use in collection classes.

Reimplemented from RWCollectable.

virtual RWClassID RWDBRow::isA ( ) const
virtual

Redefined from class RWCollectable. Returns __RWDBROW.

Reimplemented from RWCollectable.

virtual bool RWDBRow::isEqual ( const RWCollectable t) const
virtual

Behaves as if compareTo(t) was invoked, returning true if the result equals 0, false otherwise.

Reimplemented from RWCollectable.

virtual RWCollectable* RWDBRow::newSpecies ( ) const
virtual

Returns a new, default-constructed object of the same type as self. The caller is responsible for deleting the object.

Reimplemented from RWCollectable.

RWDBRow& RWDBRow::operator= ( const RWDBRow rvalue)

Assignment operator. Returns reference to self which shares an implementation with rvalue.

RWDBValue& RWDBRow::operator[] ( size_t  index) const

Returns a reference to the RWDBValue at position index in the collection. Throws an exception of type RWBoundsErr if index is out of range.

virtual void RWDBRow::restoreGuts ( RWFile file)
virtual

Reads file, replacing the contents of self.

Reimplemented from RWCollectable.

virtual void RWDBRow::restoreGuts ( RWvistream stream)
virtual

Reads stream, replacing the contents of self.

Reimplemented from RWCollectable.

virtual void RWDBRow::saveGuts ( RWFile file) const
virtual

Writes the contents of self to file.

Reimplemented from RWCollectable.

virtual void RWDBRow::saveGuts ( RWvostream stream) const
virtual

Writes the contents of self to stream.

Reimplemented from RWCollectable.

Copyright © 2022 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.