SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches

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:

  • 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:

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];
An ordered collection of RWDBValue instances.
Definition row.h:60

Constructor & Destructor Documentation

◆ RWDBRow() [1/2]

RWDBRow::RWDBRow ( )

The default constructor produces an empty RWDBRow.

◆ RWDBRow() [2/2]

RWDBRow::RWDBRow ( const RWDBRow & rvalue)

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

◆ ~RWDBRow()

virtual RWDBRow::~RWDBRow ( )
virtual

The default destructor.

Member Function Documentation

◆ append()

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

Appends value to self.

◆ binaryStoreSize()

RWspace RWDBRow::binaryStoreSize ( ) const
virtual

Returns the number of bytes required to store self.

Reimplemented from RWCollectable.

◆ clearAndDestroy()

virtual void RWDBRow::clearAndDestroy ( )
virtual

Removes all values from the collection and deletes them.

◆ compareTo()

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.

◆ copy()

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.

◆ entries()

virtual size_t RWDBRow::entries ( ) const
virtual

Returns the total number of values in the collection.

◆ hash()

virtual unsigned RWDBRow::hash ( ) const
virtual

Returns a hash value for use in collection classes.

Reimplemented from RWCollectable.

◆ isA()

virtual RWClassID RWDBRow::isA ( ) const
virtual

Redefined from class RWCollectable. Returns __RWDBROW.

Reimplemented from RWCollectable.

◆ isEqual()

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.

◆ newSpecies()

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.

◆ operator=()

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

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

◆ operator[]()

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.

◆ restoreGuts() [1/2]

virtual void RWDBRow::restoreGuts ( RWFile & file)
virtual

Reads file, replacing the contents of self.

Reimplemented from RWCollectable.

◆ restoreGuts() [2/2]

virtual void RWDBRow::restoreGuts ( RWvistream & stream)
virtual

Reads stream, replacing the contents of self.

Reimplemented from RWCollectable.

◆ saveGuts() [1/2]

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

Writes the contents of self to file.

Reimplemented from RWCollectable.

◆ saveGuts() [2/2]

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

Writes the contents of self to stream.

Reimplemented from RWCollectable.

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