rdbxx  1.0.7_02
RDB Class Reference

Provides interface for manipulating RDB tables. More...

#include <RDB.h>

Inheritance diagram for RDB:
Collaboration diagram for RDB:

Public Types

Enumerations for read/write/group return status.
enum  Status
 Acceptable column justifications. More...
 

Public Member Functions

Constructing and destructing and initializing RDB objects.
 RDB (const string &name="", ios::openmode mode=ios::in)
 Attaches RDB object to a file. More...
 
 RDB (istream *isptr)
 Attaches RDB object to an istream. More...
 
 RDB (ostream *osptr)
 Attaches RDB object to an ostream. More...
 
 RDB (const RDB &rdb)
 Copies RDB object. More...
 
 ~RDB (void)
 Deletes resources allocated by the RDB object. More...
 
I/O related operations.
void open (const string &name, ios::openmode mode=ios::in)
 Attaches RDB object to a file. More...
 
void open (istream *isptr)
 Attaches RDB object to an istream. More...
 
void open (ostream *osptr)
 Attaches RDB object to an ostream. More...
 
void open (const RDB &rdb)
 Copies RDB object. More...
 
void close (void)
 Closes the stream attached to RDB object. More...
 
int read (void)
 Read a line of data from the istream. More...
 
bool write (void)
 Write a line of data to the ostream. More...
 
bool rewind (void)
 Rewind the stream to the beginning of the first row of data. More...
 
Auto-indexing related methods.
bool autoIdx (void) const
 Indicates if auto-indexing is activated. More...
 
void autoIdx (const bool on)
 Activates/deactivates auto-indexing. More...
 
void advanceIdx (void)
 Increments the indices in the RDBColumn data elements. More...
 
Column group manipulation (break columns)
void setGroup (const string &name, bool group=true)
 Turn on/off group status for the named column. More...
 
void setGroup (const int idx, bool group=true)
 Turn on/off group status for the indexed column. More...
 
bool getGroup (const string &name)
 Returns group status, true if its a new group, for the named column. More...
 
bool getGroup (const int idx)
 Returns group status, true if its a new group, for the indexed column. More...
 
bool newGroup (void)
 Checks if any column indicates a new group. More...
 
Comment accessors.
void setComment (const string &comm, const int idx=-1)
 Add RDBComment in header of RDB object. More...
 
void setComment (RDBComment &comm, const int idx=-1)
 Add or replace RDBComment in header of RDB object. More...
 
void setComment (RDBComment &comm, const string &name, const size_t idx=0)
 Add or replace RDBComment in header of RDB object. More...
 
void setComment (const RDB &rdb)
 Copy all comments from an existing RDB object. More...
 
RDBCommentgetComment (const size_t idx)
 Return RDBComment at given index. More...
 
RDBCommentgetComment (const string &name, const size_t idx=0)
 Return RDBComment with given keyword. More...
 
Column accessors.
void setColumn (const string &name, const string &def, const int idx=-1)
 Add an RDBColumn in RDB object. More...
 
void setColumn (RDBColumn *col, const int idx=-1)
 Add or replace RDBColumn in RDB object. More...
 
void setColumn (RDBColumn *col, const string &name, const size_t idx=0)
 Add of replace RDBColumn in RDB object. More...
 
void setColumn (const RDB &rdb)
 Copy all columns from an existing RDB object. More...
 
RDBColumngetColumn (const size_t idx)
 Return pointer to RDBColumn at given index. More...
 
RDBColumngetColumn (const string &name, const size_t idx=0)
 Return pointer to RDBColumn with given name. More...
 
Column index based accessors.
void setName (const size_t idx, const string &name)
 Modify the name of the RDBColumn at idx. More...
 
void setDef (const size_t idx, const string &def)
 Modify the definition of the RDBColumn at idx. More...
 
void setWidth (const size_t idx, const long width)
 Modify the width of the RDBColumn at idx. More...
 
void setType (const size_t idx, const RDBColumn::Type type)
 Modify the type of the RDBColumn at idx. More...
 
void setJust (const size_t idx, const RDBColumn::Just just)
 Modify the justification of the RDBColumn at idx. More...
 
void setDesc (const size_t idx, const string &desc)
 Modify the description of the RDBColumn at idx. More...
 
void mapData (const size_t idx, double data[], const size_t nelems=1)
 Map RDBColumn data to user-supplied memory. More...
 
void mapData (const size_t idx, long data[], const size_t nelems=1)
 Map RDBColumn data to user-supplied memory. More...
 
void mapData (const size_t idx, string data[], const size_t nelems=1)
 Map RDBColumn data to user-supplied memory. More...
 
void setData (const size_t idx, const double data)
 Sets the data value of RDBColumn, converting as necessary. More...
 
void setData (const size_t idx, const long data)
 Sets the data value of RDBColumn, converting as necessary. More...
 
void setData (const size_t idx, const string &data)
 Sets the data value of RDBColumn, converting as necessary. More...
 
void getName (const size_t idx, string &name) const
 Return the name of the RDBColumn at idx. More...
 
void getDef (const size_t idx, string &def)
 Return the definition of the RDBColumn at idx. More...
 
void getWidth (const size_t idx, long &width) const
 Return the width of the RDBColumn at idx. More...
 
void getType (const size_t idx, RDBColumn::Type &type) const
 Return the type of the RDBColumn at idx. More...
 
void getJust (const size_t idx, RDBColumn::Just &just) const
 Return the just of the RDBColumn at idx. More...
 
void getDesc (const size_t idx, string &desc) const
 Return the description of the RDBColumn at idx. More...
 
void getData (const size_t idx, double &data)
 Return the data of the RDBColumn at idx, converting if necessary. More...
 
void getData (const size_t idx, long &data)
 Return the data of the RDBColumn at idx, converting if necessary. More...
 
void getData (const size_t idx, string &data)
 Return the data of the RDBColumn at idx, converting if necessary. More...
 
string getName (const size_t idx) const
 Return the name of the RDBColumn at idx. More...
 
string getDef (const size_t idx)
 Return the definition of the RDBColumn at idx. More...
 
long getWidth (const size_t idx) const
 Return the width of the RDBColumn at idx. More...
 
RDBColumn::Type getType (const size_t idx) const
 Return the type of the RDBColumn at idx. More...
 
RDBColumn::Just getJust (const size_t idx) const
 Return the justification of the RDBColumn at idx. More...
 
string getDesc (const size_t idx) const
 Return the description of the RDBColumn at idx. More...
 
double getDataDouble (const size_t idx)
 Return the data of the RDBColumn at idx, converting if necessary. More...
 
long getDataLong (const size_t idx)
 Return the data of the RDBColumn at idx, converting if necessary. More...
 
string getDataString (const size_t idx)
 Return the data of the RDBColumn at idx, converting if necessary. More...
 
Column name based accessors.
void setName (const string &name, const string &newname)
 Modify the RDBColumn name. More...
 
void setDef (const string &name, const string &def)
 Modify the RDBColumn definition. More...
 
void setWidth (const string &name, const long width)
 Modify the RDBColumn width. More...
 
void setType (const string &name, const RDBColumn::Type type)
 Modify the RDBColumn type. More...
 
void setJust (const string &name, const RDBColumn::Just just)
 Modify the RDBColumn justification. More...
 
void setDesc (const string &name, const string &desc)
 Modify the RDBColumn description. More...
 
void mapData (const string &name, double data[], const size_t nelems=1)
 Map RDBColum data to user-supplied memory. More...
 
void mapData (const string &name, long data[], const size_t nelems=1)
 Map RDBColum data to user-supplied memory. More...
 
void mapData (const string &name, string data[], const size_t nelems=1)
 Map RDBColum data to user-supplied memory. More...
 
void setData (const string &name, const double data)
 Modify the RDBColumn data, converting if necessary. More...
 
void setData (const string &name, const long data)
 Modify the RDBColumn data, converting if necessary. More...
 
void setData (const string &name, const string &data)
 Modify the RDBColumn data, converting if necessary. More...
 
void getName (const string &name, string &namefound) const
 Return the name of the RDBColumn. More...
 
void getDef (const string &name, string &def)
 Return the definition of the RDBColumn. More...
 
void getWidth (const string &name, long &width) const
 Return the width of the RDBColumn. More...
 
void getType (const string &name, RDBColumn::Type &type) const
 Return the type of the RDBColumn. More...
 
void getJust (const string &name, RDBColumn::Just &just) const
 Return the justification of the RDBColumn. More...
 
void getDesc (const string &name, string &desc) const
 Return the description of the RDBColumn. More...
 
void getData (const string &name, double &data)
 Return the data of the RDBColumn, converting if necessary. More...
 
void getData (const string &name, long &data)
 Return the data of the RDBColumn, converting if necessary. More...
 
void getData (const string &name, string &data)
 Return the data of the RDBColumn, converting if necessary. More...
 
string getName (const string &name) const
 Return the name of the RDBColumn. More...
 
string getDef (const string &name)
 Return the definition of the RDBColumn. More...
 
long getWidth (const string &name) const
 Return the width of the RDBColumn. More...
 
RDBColumn::Type getType (const string &name) const
 Return the type of the RDBColumn. More...
 
RDBColumn::Just getJust (const string &name) const
 Return the justification of the RDBColumn. More...
 
string getDesc (const string &name) const
 Return the description of the RDBColumn. More...
 
double getDataDouble (const string &name)
 Return the data of the RDBColumn, converting if necessary. More...
 
long getDataLong (const string &name)
 Return the data of the RDBColumn, converting if necessary. More...
 
string getDataString (const string &name)
 Return the data of the RDBColumn, converting if necessary. More...
 
Table and header statistics.
size_t nComments (void) const
 Return number of comments in RDB object. More...
 
size_t nColumns (void) const
 Return number of columns in RDB object. More...
 
size_t nRows (void)
 Return number of rows in RDB object. More...
 

Protected Member Functions

void parseHeader (void)
 Parse header, i.e. comments and column names and definitions. More...
 
vector< string > parseLine (const string &line) const
 Parse fields in a row. More...
 
size_t parseLine (bool &newgroup)
 Parse fields in a row. More...
 

Protected Attributes

string _filename
 Name of RDB file. More...
 
ios::openmode _mode
 Open mode of the associated stream. More...
 
istream * _isptr
 Istream attached to data file. More...
 
ostream * _osptr
 Ostream attached to data file. More...
 
bool _myisptr
 Indicates if RDB object is responsible for deallocating the istream. More...
 
bool _myosptr
 Indicates if RDB object is responsible for deallocating the ostream. More...
 
size_t _rewindto
 Position of beginning of first row of data. More...
 
size_t _ncomms
 Number of comments. More...
 
size_t _ncols
 Number of columns. More...
 
size_t _nrows
 Number of rows. More...
 
bool _knowrows
 Indicates if associated file must be scanned to determine number of rows. More...
 
long _rownum
 Current table row number. More...
 
long _frownum
 Current file row number. More...
 
bool _autoidx
 Indicates if RDBColumn data elements should be advanced. More...
 
bool _firstread
 Indicates if this is the first call to RDB::read. More...
 
bool _lastread
 Indicates if this is the last call to RDB::read. More...
 
bool _writehdr
 Indicates if the header has been output. More...
 
RDBComment_comms
 Array of RDBComments. More...
 
RDBColumn ** _cols
 Array of RDBColumns. More...
 
RDBLongColumn _nrcol
 Hidden column, containing row number. More...
 
bool * _mycols
 Indicates if RDB object is responsible for deallocating given RDBColumn. More...
 
string _line
 Line from RDB table. More...
 

Friends

Stream insertion and extraction operators.
istream & operator>> (istream &is, RDB &rdb)
 Read table from input stream. More...
 
ostream & operator<< (ostream &os, RDB &rdb)
 Write table to output stream. More...
 

Detailed Description

Provides interface for manipulating RDB tables.

Definition at line 43 of file RDB.h.

Member Enumeration Documentation

◆ Status

Acceptable column justifications.

Definition at line 56 of file RDB.h.

Constructor & Destructor Documentation

◆ RDB() [1/4]

RDB::RDB ( const string &  name = "",
ios::openmode  mode = ios::in 
)

Attaches RDB object to a file.

Parameters
namethe name of the RDB file.
modethe ios::openmode of the file.
Exceptions
RDBErrerror opening RDB file.
RDBErrerror parsing RDB comment or column name and definition.
RDBErrerror parsing RDB column definition.

Attaches RDB object's I/O stream to the file. If mode is set to ios::in, it calls RDB::parseHeader(void) to read comments, column names, and column definitions.

If no filename is specified, then the RDB::open() method may be used later to attach a file to the object.

Definition at line 118 of file RDB.cc.

◆ RDB() [2/4]

RDB::RDB ( istream *  isptr)

Attaches RDB object to an istream.

Parameters
isptrinput stream to attach to the RDB object.
Exceptions
RDBErrerror parsing RDB comment or column name and definition.
RDBErrerror parsing RDB column definition.

Attaches the istream to the RDB object. RDB::parseHeader(void) is called to read comments, column names, and column definitions.

Definition at line 164 of file RDB.cc.

◆ RDB() [3/4]

RDB::RDB ( ostream *  osptr)

Attaches RDB object to an ostream.

Parameters
osptroutput stream to attach to the RDB object.

Attaches the ostream to the RDB object.

Definition at line 199 of file RDB.cc.

◆ RDB() [4/4]

RDB::RDB ( const RDB rdb)

Copies RDB object.

Parameters
rdbcopy RDB object.

Makes a copy of the argument.

Definition at line 234 of file RDB.cc.

◆ ~RDB()

RDB::~RDB ( void  )

Deletes resources allocated by the RDB object.

Deletes RDBComments and RDBColumns.

Closes only the streams the object opened. User is responsible for closing streams they supply to the object.

Warning
If the user supplies an RDBColumn object via the RDB::setColumn() method, the user is responsible for deleting that object.

Definition at line 271 of file RDB.cc.

Member Function Documentation

◆ advanceIdx()

void RDB::advanceIdx ( void  )

Increments the indices in the RDBColumn data elements.

This method advances the auto-indices for all RDBColumns associated with this object.

Definition at line 857 of file RDB.cc.

◆ autoIdx() [1/2]

bool RDB::autoIdx ( void  ) const

Indicates if auto-indexing is activated.

Returns
State of the auto-indexing flag for this object.

Definition at line 843 of file RDB.cc.

◆ autoIdx() [2/2]

void RDB::autoIdx ( const bool  on)

Activates/deactivates auto-indexing.

Parameters
onsets the auto-indexing behavior for the RDB object and its columns.

Sets RDBTable::_autoidx. This effectly turns off the auto-incrementing behavior for a single call to RDB::read(void) or RDB::write(void). For arrays of mapped memory, this will cause one line's data to overwrite the previous line's data.

Warning
RDB::_autoidx is set to true after each call to RDB::read(void) or RDB::write(void).

Definition at line 830 of file RDB.cc.

◆ close()

void RDB::close ( void  )

Closes the stream attached to RDB object.

Closes any streams that the RDB object created.

Definition at line 526 of file RDB.cc.

◆ getColumn() [1/2]

RDBColumn * RDB::getColumn ( const size_t  idx)

Return pointer to RDBColumn at given index.

Parameters
idxthe index of the RDBColumn.
Exceptions
RDBErrerror if the index is out of range.
Returns
RDBColumn with index equal to idx.

RDBColumns are indexed in the order in which they appear in the RDB file starting with 0. Parameter idx must be between 0 and RDB::nColumns(void) less one.

Definition at line 1433 of file RDB.cc.

◆ getColumn() [2/2]

RDBColumn * RDB::getColumn ( const string &  name,
const size_t  idx = 0 
)

Return pointer to RDBColumn with given name.

Parameters
namethe name of the column.
idxcurrently not defined.
Exceptions
RDBErrNotFnderror if there is no column with matching name.
Returns
RDBColumn with matching name.

Definition at line 1458 of file RDB.cc.

◆ getComment() [1/2]

RDBComment & RDB::getComment ( const size_t  idx)

Return RDBComment at given index.

Parameters
idxthe index of the RDBComment.
Exceptions
RDBErrNoterror if the index is out of range.
Returns
RDBComment with index equal to idx.

RDBComments are indexed in the order in which they appear in the RDB file starting with 0. Parameter idx must be between 0 and RDB::nComments(void) less one.

Definition at line 1148 of file RDB.cc.

◆ getComment() [2/2]

RDBComment & RDB::getComment ( const string &  name,
const size_t  idx = 0 
)

Return RDBComment with given keyword.

Parameters
namethe name of the comment keyword.
idxcurrently not defined.
Exceptions
RDBErrerror if there is no comment with matching keyword.
Returns
RDBComment with matching keyword.

Definition at line 1173 of file RDB.cc.

◆ getData() [1/6]

void RDB::getData ( const size_t  idx,
double &  data 
)

Return the data of the RDBColumn at idx, converting if necessary.

Parameters
idxindex of RDBColumn
dataretrieve data of RDBColumn.
Exceptions
RDBErrif index is out of range.
RDBErrif data is invalid datatype for RDBColumn.

Definition at line 1933 of file RDB.cc.

◆ getData() [2/6]

void RDB::getData ( const size_t  idx,
long &  data 
)

Return the data of the RDBColumn at idx, converting if necessary.

Parameters
idxindex of RDBColumn
dataretrieve data of RDBColumn.
Exceptions
RDBErrif index is out of range.
RDBErrif data is invalid datatype for RDBColumn.

Definition at line 1961 of file RDB.cc.

◆ getData() [3/6]

void RDB::getData ( const size_t  idx,
string &  data 
)

Return the data of the RDBColumn at idx, converting if necessary.

Parameters
idxindex of RDBColumn
dataretrieve data of RDBColumn.
Exceptions
RDBErrif index is out of range.
RDBErrif data is invalid datatype for RDBColumn.

Definition at line 1989 of file RDB.cc.

◆ getData() [4/6]

void RDB::getData ( const string &  name,
double &  data 
)

Return the data of the RDBColumn, converting if necessary.

Parameters
nameof RDBColumn
datadata of RDBColumn.
Exceptions
RDBErrif no matching column name is found.
RDBErrif data is invalid datatype for RDBColumn.

Definition at line 2778 of file RDB.cc.

◆ getData() [5/6]

void RDB::getData ( const string &  name,
long &  data 
)

Return the data of the RDBColumn, converting if necessary.

Parameters
nameof RDBColumn
datadata of RDBColumn.
Exceptions
RDBErrif no matching column name is found.
RDBErrif data is invalid datatype for RDBColumn.

Definition at line 2812 of file RDB.cc.

◆ getData() [6/6]

void RDB::getData ( const string &  name,
string &  data 
)

Return the data of the RDBColumn, converting if necessary.

Parameters
nameof RDBColumn
datadata of RDBColumn.
Exceptions
RDBErrif data is invalid datatype for RDBColumn.
RDBErrif no matching column name is found.

Definition at line 2846 of file RDB.cc.

◆ getDataDouble() [1/2]

double RDB::getDataDouble ( const size_t  idx)

Return the data of the RDBColumn at idx, converting if necessary.

Parameters
idxindex of RDBColumn
Exceptions
RDBErrif index is out of range.
RDBErrif data is invalid datatype for RDBColumn.
Returns
data of RDBColumn.

Definition at line 2138 of file RDB.cc.

◆ getDataDouble() [2/2]

double RDB::getDataDouble ( const string &  name)

Return the data of the RDBColumn, converting if necessary.

Parameters
nameof RDBColumn
Exceptions
RDBErrif no matching column name is found.
RDBErrif data is invalid datatype for RDBColumn.
Returns
data of RDBColumn.

Definition at line 3025 of file RDB.cc.

◆ getDataLong() [1/2]

long RDB::getDataLong ( const size_t  idx)

Return the data of the RDBColumn at idx, converting if necessary.

Parameters
idxindex of RDBColumn
Exceptions
RDBErrif index is out of range.
RDBErrif data is invalid datatype for RDBColumn.
Returns
Data of RDBColumn.

Definition at line 2167 of file RDB.cc.

◆ getDataLong() [2/2]

long RDB::getDataLong ( const string &  name)

Return the data of the RDBColumn, converting if necessary.

Parameters
nameof RDBColumn
Exceptions
RDBErrif no matching column name is found.
RDBErrif data is invalid datatype for RDBColumn.
Returns
data of RDBColumn.

Definition at line 3058 of file RDB.cc.

◆ getDataString() [1/2]

string RDB::getDataString ( const size_t  idx)

Return the data of the RDBColumn at idx, converting if necessary.

Parameters
idxindex of RDBColumn
Exceptions
RDBErrif index is out of range.
RDBErrif data is invalid datatype for RDBColumn.
Returns
data of RDBColumn.

Definition at line 2196 of file RDB.cc.

◆ getDataString() [2/2]

string RDB::getDataString ( const string &  name)

Return the data of the RDBColumn, converting if necessary.

Parameters
nameof RDBColumn
Exceptions
RDBErrif no matching column name is found.
RDBErrif data is invalid datatype for RDBColumn.
Returns
data of RDBColumn.

Definition at line 3091 of file RDB.cc.

◆ getDef() [1/4]

void RDB::getDef ( const size_t  idx,
string &  def 
)

Return the definition of the RDBColumn at idx.

Parameters
idxindex of RDBColumn.
defretrieve definition of RDBColumn.
Exceptions
RDBErrif index is out of range.

Definition at line 1837 of file RDB.cc.

◆ getDef() [2/4]

string RDB::getDef ( const size_t  idx)

Return the definition of the RDBColumn at idx.

Parameters
idxindex of RDBColumn
Exceptions
RDBErrif index is out of range.
Returns
definition of RDBColumn.

Definition at line 2037 of file RDB.cc.

◆ getDef() [3/4]

void RDB::getDef ( const string &  name,
string &  def 
)

Return the definition of the RDBColumn.

Parameters
nameof RDBColumn
defdefinition of RDBColumn.
Exceptions
RDBErrif no matching column name is found.

Definition at line 2657 of file RDB.cc.

◆ getDef() [4/4]

string RDB::getDef ( const string &  name)

Return the definition of the RDBColumn.

Parameters
nameof RDBColumn
Exceptions
RDBErrif no matching column name is found.
Returns
definition of RDBColumn.

Definition at line 2904 of file RDB.cc.

◆ getDesc() [1/4]

void RDB::getDesc ( const size_t  idx,
string &  desc 
) const

Return the description of the RDBColumn at idx.

Parameters
idxindex of RDBColumn
descretrieve description of RDBColumn.
Exceptions
RDBErrif index is out of range.

Definition at line 1913 of file RDB.cc.

◆ getDesc() [2/4]

string RDB::getDesc ( const size_t  idx) const

Return the description of the RDBColumn at idx.

Parameters
idxindex of RDBColumn
Exceptions
RDBErrif index is out of range.
Returns
description of RDBColumn.

Definition at line 2117 of file RDB.cc.

◆ getDesc() [3/4]

void RDB::getDesc ( const string &  name,
string &  desc 
) const

Return the description of the RDBColumn.

Parameters
nameof RDBColumn
descdescription of RDBColumn.
Exceptions
RDBErrif no matching column name is found.

Definition at line 2753 of file RDB.cc.

◆ getDesc() [4/4]

string RDB::getDesc ( const string &  name) const

Return the description of the RDBColumn.

Parameters
nameof RDBColumn
Exceptions
RDBErrif no matching column name is found.
Returns
description of RDBColumn.

Definition at line 3000 of file RDB.cc.

◆ getGroup() [1/2]

bool RDB::getGroup ( const string &  name)

Returns group status, true if its a new group, for the named column.

Parameters
namethe name of the column.
Exceptions
RDBErrNotFnderror if there is no column with matching name.
Returns
Status of the column's group flag.

Definition at line 938 of file RDB.cc.

◆ getGroup() [2/2]

bool RDB::getGroup ( const int  idx)

Returns group status, true if its a new group, for the indexed column.

Parameters
idxthe column index.
Exceptions
RDBErrerror if the index is out of range.
Returns
Status of the column's group flag.

Definition at line 967 of file RDB.cc.

◆ getJust() [1/4]

void RDB::getJust ( const size_t  idx,
RDBColumn::Just just 
) const

Return the just of the RDBColumn at idx.

Parameters
idxindex of RDBColumn
justretrieve just of RDBColumn.
Exceptions
RDBErrif index is out of range.

Definition at line 1894 of file RDB.cc.

◆ getJust() [2/4]

RDBColumn::Just RDB::getJust ( const size_t  idx) const

Return the justification of the RDBColumn at idx.

Parameters
idxindex of RDBColumn
Exceptions
RDBErrif index is out of range.
Returns
justification of RDBColumn.

Definition at line 2097 of file RDB.cc.

◆ getJust() [3/4]

void RDB::getJust ( const string &  name,
RDBColumn::Just just 
) const

Return the justification of the RDBColumn.

Parameters
nameof RDBColumn
justjustification of RDBColumn.
Exceptions
RDBErrif no matching column name is found.

Definition at line 2729 of file RDB.cc.

◆ getJust() [4/4]

RDBColumn::Just RDB::getJust ( const string &  name) const

Return the justification of the RDBColumn.

Parameters
nameof RDBColumn
Exceptions
RDBErrif no matching column name is found.
Returns
justification of RDBColumn.

Definition at line 2976 of file RDB.cc.

◆ getName() [1/4]

void RDB::getName ( const size_t  idx,
string &  name 
) const

Return the name of the RDBColumn at idx.

Parameters
idxindex of RDBColumn.
nameretrieve name of RDBColumn.
Exceptions
RDBErrif index is out of range.

Definition at line 1818 of file RDB.cc.

◆ getName() [2/4]

string RDB::getName ( const size_t  idx) const

Return the name of the RDBColumn at idx.

Parameters
idxindex of RDBColumn
Exceptions
RDBErrif index is out of range.
Returns
name of RDBColumn.

Definition at line 2017 of file RDB.cc.

◆ getName() [3/4]

void RDB::getName ( const string &  name,
string &  namefound 
) const

Return the name of the RDBColumn.

Parameters
nameof RDBColumn
namefoundname of RDBColumn if found.
Exceptions
RDBErrif no matching column name is found.

Definition at line 2633 of file RDB.cc.

◆ getName() [4/4]

string RDB::getName ( const string &  name) const

Return the name of the RDBColumn.

Parameters
nameof RDBColumn
Exceptions
RDBErrif no matching column name is found.
Returns
name of RDBColumn.

Definition at line 2880 of file RDB.cc.

◆ getType() [1/4]

void RDB::getType ( const size_t  idx,
RDBColumn::Type type 
) const

Return the type of the RDBColumn at idx.

Parameters
idxindex of RDBColumn.
typeretrieve type of RDBColumn.
Exceptions
RDBErrif index is out of range.

Definition at line 1875 of file RDB.cc.

◆ getType() [2/4]

RDBColumn::Type RDB::getType ( const size_t  idx) const

Return the type of the RDBColumn at idx.

Parameters
idxindex of RDBColumn
Exceptions
RDBErrif index is out of range.
Returns
type of RDBColumn.

Definition at line 2077 of file RDB.cc.

◆ getType() [3/4]

void RDB::getType ( const string &  name,
RDBColumn::Type type 
) const

Return the type of the RDBColumn.

Parameters
nameof RDBColumn
typetype of RDBColumn.
Exceptions
RDBErrif no matching column name is found.

Definition at line 2705 of file RDB.cc.

◆ getType() [4/4]

RDBColumn::Type RDB::getType ( const string &  name) const

Return the type of the RDBColumn.

Parameters
nameof RDBColumn
Exceptions
RDBErrif no matching column name is found.
Returns
type of RDBColumn.

Definition at line 2952 of file RDB.cc.

◆ getWidth() [1/4]

void RDB::getWidth ( const size_t  idx,
long &  width 
) const

Return the width of the RDBColumn at idx.

Parameters
idxindex of RDBColumn.
widthretrieve width of RDBColumn.
Exceptions
RDBErrif index is out of range.

Definition at line 1856 of file RDB.cc.

◆ getWidth() [2/4]

long RDB::getWidth ( const size_t  idx) const

Return the width of the RDBColumn at idx.

Parameters
idxindex of RDBColumn
Exceptions
RDBErrif index is out of range.
Returns
width of RDBColumn.

Definition at line 2057 of file RDB.cc.

◆ getWidth() [3/4]

void RDB::getWidth ( const string &  name,
long &  width 
) const

Return the width of the RDBColumn.

Parameters
nameof RDBColumn
widthwidth of RDBColumn.
Exceptions
RDBErrif no matching column name is found.

Definition at line 2681 of file RDB.cc.

◆ getWidth() [4/4]

long RDB::getWidth ( const string &  name) const

Return the width of the RDBColumn.

Parameters
nameof RDBColumn
Exceptions
RDBErrif no matching column name is found.
Returns
width of RDBColumn.

Definition at line 2928 of file RDB.cc.

◆ mapData() [1/6]

void RDB::mapData ( const size_t  idx,
double  data[],
const size_t  nelems = 1 
)

Map RDBColumn data to user-supplied memory.

Parameters
idxindex of RDBColumn.
datauser-supplied memory for storing data.
nelemsnumber of elements in user-supplied data.
Exceptions
RDBErrif index is out of range.
RDBErrif data is invalid datatype for RDBColumn.

Definition at line 1650 of file RDB.cc.

◆ mapData() [2/6]

void RDB::mapData ( const size_t  idx,
long  data[],
const size_t  nelems = 1 
)

Map RDBColumn data to user-supplied memory.

Parameters
idxindex of RDBColumn.
datauser-supplied memorgy to stored data.
nelemsnumber of elems in user-supplied memory.
Exceptions
RDBErrif index is out of range.
RDBErrif data is invalid datatype for RDBColumn.

Definition at line 1678 of file RDB.cc.

◆ mapData() [3/6]

void RDB::mapData ( const size_t  idx,
string  data[],
const size_t  nelems = 1 
)

Map RDBColumn data to user-supplied memory.

Parameters
idxindex of RDBColumn.
datauser-supplied memory to store data.
nelemsnumber of elements in user-supplied data.
Exceptions
RDBErrif index is out of range.
RDBErrif data is invalid datatype for RDBColumn.

Definition at line 1707 of file RDB.cc.

◆ mapData() [4/6]

void RDB::mapData ( const string &  name,
double  data[],
const size_t  nelems = 1 
)

Map RDBColum data to user-supplied memory.

Parameters
nameof RDBColumn
datauser-supplied memory to store RDBColumn data.
nelemsnumber of elems in user-supplied memory.
Exceptions
RDBErrif no matching column name is found.
RDBErrif data is invalid datatype for RDBColumn.

Definition at line 2426 of file RDB.cc.

◆ mapData() [5/6]

void RDB::mapData ( const string &  name,
long  data[],
const size_t  nelems = 1 
)

Map RDBColum data to user-supplied memory.

Parameters
nameof RDBColumn
datauser-supplied memory to store RDBColumn data.
nelemsnumber of elems in user-supplied memory.
Exceptions
RDBErrif no matching column name is found.
RDBErrif data is invalid datatype for RDBColumn.

Definition at line 2462 of file RDB.cc.

◆ mapData() [6/6]

void RDB::mapData ( const string &  name,
string  data[],
const size_t  nelems = 1 
)

Map RDBColum data to user-supplied memory.

Parameters
nameof RDBColumn
datauser-supplied memory to store RDBColumn data.
nelemsnumber of elems in user-supplied memory.
Exceptions
RDBErrif no matching column name is found.
RDBErrif data is invalid datatype for RDBColumn.

Definition at line 2499 of file RDB.cc.

◆ nColumns()

size_t RDB::nColumns ( void  ) const

Return number of columns in RDB object.

Returns
Number of columns.

Definition at line 3133 of file RDB.cc.

◆ nComments()

size_t RDB::nComments ( void  ) const

Return number of comments in RDB object.

Returns
Number of comments.

Definition at line 3120 of file RDB.cc.

◆ newGroup()

bool RDB::newGroup ( void  )

Checks if any column indicates a new group.

Returns
True if any column indicates a new group, false otherwise.

A new group occurs when the data values between consecutive rows change.

Definition at line 989 of file RDB.cc.

◆ nRows()

size_t RDB::nRows ( void  )

Return number of rows in RDB object.

Returns
Number of rows.
Warning
This method reads through the entire RDB file to count the number of rows and then attempts to rewind the file to the location at which it began . If the stream attached to the RDB object is not seekable, this method will fail.

Definition at line 3151 of file RDB.cc.

◆ open() [1/4]

void RDB::open ( const string &  name,
ios::openmode  mode = ios::in 
)

Attaches RDB object to a file.

Parameters
namethe name of the RDB file.
modethe ios::openmode of the file.
Exceptions
RDBErrerror opening RDB file.
RDBErrerror parsing RDB comment or column name and definition.
RDBErrerror parsing RDB column definition.

Attaches RDB object's I/O stream to the file. If mode is set to ios::in, it calls RDB::parseHeader(void) to read comments, column names, and column definitions.

Warning
This method closes any previously opened streams.

Definition at line 316 of file RDB.cc.

◆ open() [2/4]

void RDB::open ( istream *  isptr)

Attaches RDB object to an istream.

Parameters
isptrinput stream to attach to the RDB object.
Exceptions
RDBErrerror parsing RDB comments or column names and definitions
RDBErrerror parsing RDB column definition.

Attaches the istream to the RDB object. RDB::parseHeader(void) is called to read comments, column names, and column definitions.

Warning
This method closes any previously opened streams.

Definition at line 400 of file RDB.cc.

◆ open() [3/4]

void RDB::open ( ostream *  osptr)

Attaches RDB object to an ostream.

Parameters
osptroutput stream to attach to the RDB object.

Attaches the ostream to the RDB object.

Warning
This method closes any previously opened streams.

Definition at line 432 of file RDB.cc.

◆ open() [4/4]

void RDB::open ( const RDB rdb)

Copies RDB object.

Parameters
rdbcopy RDB object.
Warning
This method is currently not implemented.

Definition at line 451 of file RDB.cc.

◆ parseHeader()

void RDB::parseHeader ( void  )
protected

Parse header, i.e. comments and column names and definitions.

Parses out comments and column names and defintions from the RDB file header.

This is used by RDB::open().

Definition at line 3185 of file RDB.cc.

◆ parseLine() [1/2]

vector< string > RDB::parseLine ( const string &  line) const
protected

Parse fields in a row.

Parameters
linethe line to be split.
Returns
Vector of tokens, one for each tab delimited field.

Splits the input line on tabs.

Definition at line 3284 of file RDB.cc.

◆ parseLine() [2/2]

size_t RDB::parseLine ( bool &  newgroup)
protected

Parse fields in a row.

Returns
number of tokens parsed.

Splits the line on tabs and assigns the tokens to the RDBColumns.

Definition at line 3316 of file RDB.cc.

◆ read()

int RDB::read ( void  )

Read a line of data from the istream.

Exceptions
RDBErrerror if the number of tokens found does not match the number of tokens expected.
RDBErrerror if non-numeric data is found in a numeric column.
RDBErrerror if a floating point number is being assigned to an integer column.

S *

Returns
RDB::Status indicating if end of file, end of line, or end of group was reached.

Reads, parses, and stores data from the next line in the RDB file is an input stream has been provided. If RDB::_autoidx is set, this method will advance the indices in each RDBColumn's data pointer before reading and will increment the row number, RDB::_rownum, for the default ‘_NR’ column.

Definition at line 589 of file RDB.cc.

◆ rewind()

bool RDB::rewind ( void  )

Rewind the stream to the beginning of the first row of data.

Returns
false if the stream associated with this RDB object cannot be rewound, i.e seekg() or seekp() is not defined.

Rewinds the stream associate with this object to the beginning of the first row of data. It also calls RDBColumn::rewind(void) for each RDBColumn. If the user supplied data storage to a particular column, the auto-incrementing index is rewound to point at the first element of the user supplied array.

Warning
If an istream or ostream, like cin or cout, was provided to the object, you only get one chance to read it. You can't rewind, you can't close and reopen.

Definition at line 772 of file RDB.cc.

◆ setColumn() [1/4]

void RDB::setColumn ( const string &  name,
const string &  def,
const int  idx = -1 
)

Add an RDBColumn in RDB object.

Parameters
nameof the RDBColumn object
defdefinition of the RDBColumn object
idxthe position of the column on which to operate.

Columns are numbered as they appear in the RDB file from left to right starting with 0. If the index is not specified or does not fall within the range of existing columns, an RDBColumn is created and is appended to the list of columns. The RDB object handles memory allocation and deletion.

Upon completion, the RDB object contains a pointer to the RDBColumn created. Any modifications to the RDBColumn outside of the RDB object will be reflected within the RDB object and vice versa.

Definition at line 1208 of file RDB.cc.

◆ setColumn() [2/4]

void RDB::setColumn ( RDBColumn col,
const int  idx = -1 
)

Add or replace RDBColumn in RDB object.

Parameters
cola reference to the RDBColumn object
idxthe position of the column on which to operate.

Columns are numbered as they appear in the RDB file from left to right starting with 0. If the index is not specified or does not fall within the range of existing columns, the RDBColumn is appended to the list of columns.

Upon completion, the RDB object contains a pointer to the RDBColumn provided. Any modifications to the RDBColumn outside of the RDB object will be reflected within the RDB object and vice versa.

Warning
The user is responsible for freeing the RDBColumn.

Definition at line 1274 of file RDB.cc.

◆ setColumn() [3/4]

void RDB::setColumn ( RDBColumn col,
const string &  name,
const size_t  idx = 0 
)

Add of replace RDBColumn in RDB object.

Parameters
cola reference to the RDBColumn object
namethe name of the column in this RDB object.
idxcurrently not defined.

If no matching column is found, the column is appended to the list of columns after assigning it a name of 'name'. Otherwise, col replaces the existing column.

Upon completion, the RDB object contains a pointer to the RDBColumn provided. Any modifications to the RDBColumn outside of the RDB object will be reflected within the RDB object and vice versa.

Warning
The user is responsible for freeing the RDBColumn.

Definition at line 1331 of file RDB.cc.

◆ setColumn() [4/4]

void RDB::setColumn ( const RDB rdb)

Copy all columns from an existing RDB object.

Parameters
rdba reference to an RDB object

Copies all columns from the argument to this RDB object. Any columns previously associated with this object are removed.

Warning
The user is responsible for free any RDBColumns previously allocated and assigned to this RDB object via the RDB::setColumn methods.

Definition at line 1368 of file RDB.cc.

◆ setComment() [1/4]

void RDB::setComment ( const string &  comm,
const int  idx = -1 
)

Add RDBComment in header of RDB object.

Parameters
comma comment string.
idxthe position of the comment on which to operate.

Comments are numbered as they appear in the RDB file from top to bottom. If the index is not specified or does not fall within the range of existing comments, the RDBComment is appended to the list of comments.

Definition at line 1015 of file RDB.cc.

◆ setComment() [2/4]

void RDB::setComment ( RDBComment comm,
const int  idx = -1 
)

Add or replace RDBComment in header of RDB object.

Parameters
comma reference to the RDBComment object
idxthe position of the comment on which to operate.

Comments are numbered as they appear in the RDB file from top to bottom. If the index is not specified or does not fall within the range of existing comments, the RDBComment is appended to the list of comments.

Definition at line 1053 of file RDB.cc.

◆ setComment() [3/4]

void RDB::setComment ( RDBComment comm,
const string &  name,
const size_t  idx = 0 
)

Add or replace RDBComment in header of RDB object.

Parameters
comma reference to the RDBComment object
namethe name of the comment keyword.
idxcurrently not defined.

If no matching comment keyword is found, the comment is appended to the list of comments. Otherwise, comm replaces the existing comment.

Definition at line 1090 of file RDB.cc.

◆ setComment() [4/4]

void RDB::setComment ( const RDB rdb)

Copy all comments from an existing RDB object.

Parameters
rdba reference to an RDB object

Copies all comments from the argument to this RDB object. Any comments previously associated with this object are removed.

Definition at line 1116 of file RDB.cc.

◆ setData() [1/6]

void RDB::setData ( const size_t  idx,
const double  data 
)

Sets the data value of RDBColumn, converting as necessary.

Parameters
idxindex of RDBColumn.
datavalue to assign to RDBColumn data.
Exceptions
RDBErrif index is out of range.
RDBErrif data is invalid for RDBColumn.

Definition at line 1735 of file RDB.cc.

◆ setData() [2/6]

void RDB::setData ( const size_t  idx,
const long  data 
)

Sets the data value of RDBColumn, converting as necessary.

Parameters
idxindex of RDBColumn.
datavalue to assign to RDBColumn data.
Exceptions
RDBErrif index is out of range.
RDBErrif data is invalid for RDBColumn.

Definition at line 1763 of file RDB.cc.

◆ setData() [3/6]

void RDB::setData ( const size_t  idx,
const string &  data 
)

Sets the data value of RDBColumn, converting as necessary.

Parameters
idxindex of RDBColumn/
datavalue to assign RDBColumn data.
Exceptions
RDBErrif index is out of range.
RDBErrif data is invalid for RDBColumn.

Definition at line 1791 of file RDB.cc.

◆ setData() [4/6]

void RDB::setData ( const string &  name,
const double  data 
)

Modify the RDBColumn data, converting if necessary.

Parameters
nameof RDBColumn
datavalue to assign RDBColumn data.
Exceptions
RDBErrif no matching column name is found.
RDBErrif data is invalid datatype for RDBColumn.

Definition at line 2534 of file RDB.cc.

◆ setData() [5/6]

void RDB::setData ( const string &  name,
const long  data 
)

Modify the RDBColumn data, converting if necessary.

Parameters
nameof RDBColumn
datavalue to assign RDBColumn data.
Exceptions
RDBErrif no matching column name is found.
RDBErrif data is invalid datatype for RDBColumn.

Definition at line 2567 of file RDB.cc.

◆ setData() [6/6]

void RDB::setData ( const string &  name,
const string &  data 
)

Modify the RDBColumn data, converting if necessary.

Parameters
nameof RDBColumn
datavalue to assign RDBColumn data.
Exceptions
RDBErrif no matching column name is found.
RDBErrif data is invalid datatype for RDBColumn.

Definition at line 2600 of file RDB.cc.

◆ setDef() [1/2]

void RDB::setDef ( const size_t  idx,
const string &  def 
)

Modify the definition of the RDBColumn at idx.

Parameters
idxindex of RDBColumn.
defRDBColumn definition.
Exceptions
RDBErrif index is out of range.
RDBErrif def is invalid RDBColumn definition.

Definition at line 1509 of file RDB.cc.

◆ setDef() [2/2]

void RDB::setDef ( const string &  name,
const string &  def 
)

Modify the RDBColumn definition.

Parameters
nameof RDBColumn
defdefinition of RDBColumn.
Exceptions
RDBErrif no matching column name is found.
RDBErrif def is invalid definition for RDBColumn.

Definition at line 2250 of file RDB.cc.

◆ setDesc() [1/2]

void RDB::setDesc ( const size_t  idx,
const string &  desc 
)

Modify the description of the RDBColumn at idx.

Parameters
idxindex of RDBColumn.
descRDBColumn description.
Exceptions
RDBErrif index is out of range.
RDBErrif desc is invalid RDBColumn description.

Definition at line 1621 of file RDB.cc.

◆ setDesc() [2/2]

void RDB::setDesc ( const string &  name,
const string &  desc 
)

Modify the RDBColumn description.

Parameters
nameof RDBColumn
descdescription of RDBColumn.
Exceptions
RDBErrif no matching column name is found.
RDBErrif desc is invalid description for RDBColumn.

Definition at line 2390 of file RDB.cc.

◆ setGroup() [1/2]

void RDB::setGroup ( const string &  name,
bool  group = true 
)

Turn on/off group status for the named column.

Parameters
groupa bool indicating whether group is on or off.
namethe name of the column in this RDB object.
Exceptions
RDBErerror if there is no column with matching name.

Definition at line 878 of file RDB.cc.

◆ setGroup() [2/2]

void RDB::setGroup ( const int  idx,
bool  group = true 
)

Turn on/off group status for the indexed column.

Parameters
groupa bool indicating whether group is on or off.
idxthe position of the column on which to operate.
Exceptions
RDBErrerror if there is no column with matching name.

Definition at line 911 of file RDB.cc.

◆ setJust() [1/2]

void RDB::setJust ( const size_t  idx,
const RDBColumn::Just  just 
)

Modify the justification of the RDBColumn at idx.

Parameters
idxindex of RDBColumn.
justRDBColumn justification.
Exceptions
RDBErrif index is out of range.
RDBErrif just is invalid RDBColumn justification.

Definition at line 1593 of file RDB.cc.

◆ setJust() [2/2]

void RDB::setJust ( const string &  name,
const RDBColumn::Just  just 
)

Modify the RDBColumn justification.

Parameters
nameof RDBColumn
justjustification of RDBColumn.
Exceptions
RDBErrif no matching column name is found.
RDBErrif just is invalid justification for RDBColumn.

Definition at line 2355 of file RDB.cc.

◆ setName() [1/2]

void RDB::setName ( const size_t  idx,
const string &  name 
)

Modify the name of the RDBColumn at idx.

Parameters
idxindex of RDBColumn.
nameto assign to RDBColumn at idx.
Exceptions
RDBErrif index is out of range.

Definition at line 1488 of file RDB.cc.

◆ setName() [2/2]

void RDB::setName ( const string &  name,
const string &  newname 
)

Modify the RDBColumn name.

Parameters
nameof RDBColumn
newnamenew name of RDBColumn.
Exceptions
RDBErrif no matching column name is found.
RDBErrif newname is invalid name for RDBColumn.

Definition at line 2224 of file RDB.cc.

◆ setType() [1/2]

void RDB::setType ( const size_t  idx,
const RDBColumn::Type  type 
)

Modify the type of the RDBColumn at idx.

Parameters
idxindex of RDBColumn.
typeRDBColumn type.
Exceptions
RDBErrif index is out of range.
RDBErrif type is invalid RDBColumn type.

Definition at line 1565 of file RDB.cc.

◆ setType() [2/2]

void RDB::setType ( const string &  name,
const RDBColumn::Type  type 
)

Modify the RDBColumn type.

Parameters
nameof RDBColumn
typetype of RDBColumn.
Exceptions
RDBErrif no matching column name is found.
RDBErrif type is invalid type for RDBColumn.

Definition at line 2320 of file RDB.cc.

◆ setWidth() [1/2]

void RDB::setWidth ( const size_t  idx,
const long  width 
)

Modify the width of the RDBColumn at idx.

Parameters
idxindex of RDBColumn.
widthRDBColumn width.
Exceptions
RDBErrif index is out of range.
RDBErrif width is invalid RDBColumn width.

Definition at line 1537 of file RDB.cc.

◆ setWidth() [2/2]

void RDB::setWidth ( const string &  name,
const long  width 
)

Modify the RDBColumn width.

Parameters
nameof RDBColumn
widthwidth of RDBColumn.
Exceptions
RDBErrif no matching column name is found.
RDBErrif width is invalid width for RDBColumn.

Definition at line 2285 of file RDB.cc.

◆ write()

bool RDB::write ( void  )

Write a line of data to the ostream.

Returns
false if EOF or if the ostream is bad.

Writes the next line of data to the RDB file, if an output stream has been provided. If the RDB header has not been written yet, it outputs the comments, column names and column definitions. If RDB::_autoidx is set, it will advance the indices in the RDBColumn's data pointer before reading and will increment the row number, RDB::_rownum, for the default ‘_NR’ column.

After a successful write, the RDB::_autoidx flag is set to true.

Definition at line 712 of file RDB.cc.

Friends And Related Function Documentation

◆ operator<<

ostream& operator<< ( ostream &  os,
RDB rdb 
)
friend

Write table to output stream.

Parameters
osthe output stream.
rdbthe table to print.
Returns
A reference to the output stream

Places the table on the output stream.

Definition at line 76 of file RDB.cc.

◆ operator>>

istream& operator>> ( istream &  is,
RDB rdb 
)
friend

Read table from input stream.

Parameters
isthe input stream.
rdbthe table to fill.
Returns
A reference to the input stream.

If the stream contains a valid rdbtable fill it... otherwise set ios::failbit.

Definition at line 38 of file RDB.cc.

Member Data Documentation

◆ _autoidx

bool RDB::_autoidx
protected

Indicates if RDBColumn data elements should be advanced.

Definition at line 332 of file RDB.h.

◆ _cols

RDBColumn** RDB::_cols
protected

Array of RDBColumns.

Definition at line 343 of file RDB.h.

◆ _comms

RDBComment* RDB::_comms
protected

Array of RDBComments.

Definition at line 341 of file RDB.h.

◆ _filename

string RDB::_filename
protected

Name of RDB file.

Definition at line 303 of file RDB.h.

◆ _firstread

bool RDB::_firstread
protected

Indicates if this is the first call to RDB::read.

Definition at line 334 of file RDB.h.

◆ _frownum

long RDB::_frownum
protected

Current file row number.

Definition at line 329 of file RDB.h.

◆ _isptr

istream* RDB::_isptr
protected

Istream attached to data file.

Definition at line 308 of file RDB.h.

◆ _knowrows

bool RDB::_knowrows
protected

Indicates if associated file must be scanned to determine number of rows.

Definition at line 325 of file RDB.h.

◆ _lastread

bool RDB::_lastread
protected

Indicates if this is the last call to RDB::read.

Definition at line 336 of file RDB.h.

◆ _line

string RDB::_line
protected

Line from RDB table.

Definition at line 350 of file RDB.h.

◆ _mode

ios::openmode RDB::_mode
protected

Open mode of the associated stream.

Definition at line 305 of file RDB.h.

◆ _mycols

bool* RDB::_mycols
protected

Indicates if RDB object is responsible for deallocating given RDBColumn.

Definition at line 347 of file RDB.h.

◆ _myisptr

bool RDB::_myisptr
protected

Indicates if RDB object is responsible for deallocating the istream.

Definition at line 312 of file RDB.h.

◆ _myosptr

bool RDB::_myosptr
protected

Indicates if RDB object is responsible for deallocating the ostream.

Definition at line 314 of file RDB.h.

◆ _ncols

size_t RDB::_ncols
protected

Number of columns.

Definition at line 321 of file RDB.h.

◆ _ncomms

size_t RDB::_ncomms
protected

Number of comments.

Definition at line 319 of file RDB.h.

◆ _nrcol

RDBLongColumn RDB::_nrcol
protected

Hidden column, containing row number.

Definition at line 345 of file RDB.h.

◆ _nrows

size_t RDB::_nrows
protected

Number of rows.

Definition at line 323 of file RDB.h.

◆ _osptr

ostream* RDB::_osptr
protected

Ostream attached to data file.

Definition at line 310 of file RDB.h.

◆ _rewindto

size_t RDB::_rewindto
protected

Position of beginning of first row of data.

Definition at line 317 of file RDB.h.

◆ _rownum

long RDB::_rownum
protected

Current table row number.

Definition at line 327 of file RDB.h.

◆ _writehdr

bool RDB::_writehdr
protected

Indicates if the header has been output.

Definition at line 338 of file RDB.h.


The documentation for this class was generated from the following files: