rdbxx
1.0.7_02
|
Provides interface for manipulating RDB tables. More...
#include <RDB.h>
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... | |
RDBComment & | getComment (const size_t idx) |
Return RDBComment at given index. More... | |
RDBComment & | getComment (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... | |
RDBColumn * | getColumn (const size_t idx) |
Return pointer to RDBColumn at given index. More... | |
RDBColumn * | getColumn (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... | |
enum RDB::Status |
RDB::RDB | ( | const string & | name = "" , |
ios::openmode | mode = ios::in |
||
) |
Attaches RDB object to a file.
name | the name of the RDB file. |
mode | the ios::openmode of the file. |
RDBErr | error opening RDB file. |
RDBErr | error parsing RDB comment or column name and definition. |
RDBErr | error 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.
RDB::RDB | ( | istream * | isptr | ) |
Attaches RDB object to an istream.
isptr | input stream to attach to the RDB object. |
RDBErr | error parsing RDB comment or column name and definition. |
RDBErr | error parsing RDB column definition. |
Attaches the istream to the RDB object. RDB::parseHeader(void) is called to read comments, column names, and column definitions.
RDB::RDB | ( | ostream * | osptr | ) |
RDB::RDB | ( | const RDB & | 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.
void RDB::advanceIdx | ( | void | ) |
bool RDB::autoIdx | ( | void | ) | const |
void RDB::autoIdx | ( | const bool | on | ) |
Activates/deactivates auto-indexing.
on | sets 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.
void RDB::close | ( | void | ) |
RDBColumn * RDB::getColumn | ( | const size_t | idx | ) |
Return pointer to RDBColumn at given index.
idx | the index of the RDBColumn. |
RDBErr | error if the index is out of range. |
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.
RDBColumn * RDB::getColumn | ( | const string & | name, |
const size_t | idx = 0 |
||
) |
RDBComment & RDB::getComment | ( | const size_t | idx | ) |
Return RDBComment at given index.
idx | the index of the RDBComment. |
RDBErrNot | error if the index is out of range. |
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.
RDBComment & RDB::getComment | ( | const string & | name, |
const size_t | idx = 0 |
||
) |
Return RDBComment with given keyword.
name | the name of the comment keyword. |
idx | currently not defined. |
RDBErr | error if there is no comment with matching keyword. |
void RDB::getData | ( | const size_t | idx, |
double & | data | ||
) |
void RDB::getData | ( | const size_t | idx, |
long & | data | ||
) |
void RDB::getData | ( | const size_t | idx, |
string & | data | ||
) |
void RDB::getData | ( | const string & | name, |
double & | data | ||
) |
void RDB::getData | ( | const string & | name, |
long & | data | ||
) |
void RDB::getData | ( | const string & | name, |
string & | data | ||
) |
double RDB::getDataDouble | ( | const size_t | idx | ) |
double RDB::getDataDouble | ( | const string & | name | ) |
long RDB::getDataLong | ( | const size_t | idx | ) |
long RDB::getDataLong | ( | const string & | name | ) |
string RDB::getDataString | ( | const size_t | idx | ) |
string RDB::getDataString | ( | const string & | name | ) |
void RDB::getDef | ( | const size_t | idx, |
string & | def | ||
) |
string RDB::getDef | ( | const size_t | idx | ) |
void RDB::getDef | ( | const string & | name, |
string & | def | ||
) |
string RDB::getDef | ( | const string & | name | ) |
void RDB::getDesc | ( | const size_t | idx, |
string & | desc | ||
) | const |
string RDB::getDesc | ( | const size_t | idx | ) | const |
void RDB::getDesc | ( | const string & | name, |
string & | desc | ||
) | const |
string RDB::getDesc | ( | const string & | name | ) | const |
bool RDB::getGroup | ( | const string & | name | ) |
bool RDB::getGroup | ( | const int | idx | ) |
void RDB::getJust | ( | const size_t | idx, |
RDBColumn::Just & | just | ||
) | const |
RDBColumn::Just RDB::getJust | ( | const size_t | idx | ) | const |
void RDB::getJust | ( | const string & | name, |
RDBColumn::Just & | just | ||
) | const |
RDBColumn::Just RDB::getJust | ( | const string & | name | ) | const |
void RDB::getName | ( | const size_t | idx, |
string & | name | ||
) | const |
string RDB::getName | ( | const size_t | idx | ) | const |
void RDB::getName | ( | const string & | name, |
string & | namefound | ||
) | const |
string RDB::getName | ( | const string & | name | ) | const |
void RDB::getType | ( | const size_t | idx, |
RDBColumn::Type & | type | ||
) | const |
RDBColumn::Type RDB::getType | ( | const size_t | idx | ) | const |
void RDB::getType | ( | const string & | name, |
RDBColumn::Type & | type | ||
) | const |
RDBColumn::Type RDB::getType | ( | const string & | name | ) | const |
void RDB::getWidth | ( | const size_t | idx, |
long & | width | ||
) | const |
long RDB::getWidth | ( | const size_t | idx | ) | const |
void RDB::getWidth | ( | const string & | name, |
long & | width | ||
) | const |
long RDB::getWidth | ( | const string & | name | ) | const |
void RDB::mapData | ( | const size_t | idx, |
double | data[], | ||
const size_t | nelems = 1 |
||
) |
void RDB::mapData | ( | const size_t | idx, |
long | data[], | ||
const size_t | nelems = 1 |
||
) |
void RDB::mapData | ( | const size_t | idx, |
string | data[], | ||
const size_t | nelems = 1 |
||
) |
void RDB::mapData | ( | const string & | name, |
double | data[], | ||
const size_t | nelems = 1 |
||
) |
void RDB::mapData | ( | const string & | name, |
long | data[], | ||
const size_t | nelems = 1 |
||
) |
void RDB::mapData | ( | const string & | name, |
string | data[], | ||
const size_t | nelems = 1 |
||
) |
size_t RDB::nColumns | ( | void | ) | const |
size_t RDB::nComments | ( | void | ) | const |
bool RDB::newGroup | ( | void | ) |
size_t RDB::nRows | ( | void | ) |
void RDB::open | ( | const string & | name, |
ios::openmode | mode = ios::in |
||
) |
Attaches RDB object to a file.
name | the name of the RDB file. |
mode | the ios::openmode of the file. |
RDBErr | error opening RDB file. |
RDBErr | error parsing RDB comment or column name and definition. |
RDBErr | error 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.
void RDB::open | ( | istream * | isptr | ) |
Attaches RDB object to an istream.
isptr | input stream to attach to the RDB object. |
RDBErr | error parsing RDB comments or column names and definitions |
RDBErr | error parsing RDB column definition. |
Attaches the istream to the RDB object. RDB::parseHeader(void) is called to read comments, column names, and column definitions.
void RDB::open | ( | ostream * | osptr | ) |
void RDB::open | ( | const RDB & | rdb | ) |
|
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().
|
protected |
|
protected |
int RDB::read | ( | void | ) |
Read a line of data from the istream.
RDBErr | error if the number of tokens found does not match the number of tokens expected. |
RDBErr | error if non-numeric data is found in a numeric column. |
RDBErr | error if a floating point number is being assigned to an integer column. |
S *
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.
bool RDB::rewind | ( | void | ) |
Rewind the stream to the beginning of the first row of data.
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.
void RDB::setColumn | ( | const string & | name, |
const string & | def, | ||
const int | idx = -1 |
||
) |
Add an RDBColumn in RDB object.
name | of the RDBColumn object |
def | definition of the RDBColumn object |
idx | the 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.
void RDB::setColumn | ( | RDBColumn * | col, |
const int | idx = -1 |
||
) |
Add or replace RDBColumn in RDB object.
col | a reference to the RDBColumn object |
idx | the 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.
void RDB::setColumn | ( | RDBColumn * | col, |
const string & | name, | ||
const size_t | idx = 0 |
||
) |
Add of replace RDBColumn in RDB object.
col | a reference to the RDBColumn object |
name | the name of the column in this RDB object. |
idx | currently 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.
void RDB::setColumn | ( | const RDB & | rdb | ) |
Copy all columns from an existing RDB object.
rdb | a reference to an RDB object |
Copies all columns from the argument to this RDB object. Any columns previously associated with this object are removed.
void RDB::setComment | ( | const string & | comm, |
const int | idx = -1 |
||
) |
Add RDBComment in header of RDB object.
comm | a comment string. |
idx | the 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.
void RDB::setComment | ( | RDBComment & | comm, |
const int | idx = -1 |
||
) |
Add or replace RDBComment in header of RDB object.
comm | a reference to the RDBComment object |
idx | the 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.
void RDB::setComment | ( | RDBComment & | comm, |
const string & | name, | ||
const size_t | idx = 0 |
||
) |
Add or replace RDBComment in header of RDB object.
comm | a reference to the RDBComment object |
name | the name of the comment keyword. |
idx | currently not defined. |
If no matching comment keyword is found, the comment is appended to the list of comments. Otherwise, comm replaces the existing comment.
void RDB::setComment | ( | const RDB & | rdb | ) |
void RDB::setData | ( | const size_t | idx, |
const double | data | ||
) |
void RDB::setData | ( | const size_t | idx, |
const long | data | ||
) |
void RDB::setData | ( | const size_t | idx, |
const string & | data | ||
) |
void RDB::setData | ( | const string & | name, |
const double | data | ||
) |
void RDB::setData | ( | const string & | name, |
const long | data | ||
) |
void RDB::setData | ( | const string & | name, |
const string & | data | ||
) |
void RDB::setDef | ( | const size_t | idx, |
const string & | def | ||
) |
void RDB::setDef | ( | const string & | name, |
const string & | def | ||
) |
void RDB::setDesc | ( | const size_t | idx, |
const string & | desc | ||
) |
void RDB::setDesc | ( | const string & | name, |
const string & | desc | ||
) |
void RDB::setGroup | ( | const string & | name, |
bool | group = true |
||
) |
void RDB::setGroup | ( | const int | idx, |
bool | group = true |
||
) |
void RDB::setJust | ( | const size_t | idx, |
const RDBColumn::Just | just | ||
) |
void RDB::setJust | ( | const string & | name, |
const RDBColumn::Just | just | ||
) |
void RDB::setName | ( | const size_t | idx, |
const string & | name | ||
) |
void RDB::setName | ( | const string & | name, |
const string & | newname | ||
) |
void RDB::setType | ( | const size_t | idx, |
const RDBColumn::Type | type | ||
) |
void RDB::setType | ( | const string & | name, |
const RDBColumn::Type | type | ||
) |
void RDB::setWidth | ( | const size_t | idx, |
const long | width | ||
) |
void RDB::setWidth | ( | const string & | name, |
const long | width | ||
) |
bool RDB::write | ( | void | ) |
Write a line of data to the ostream.
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.
|
friend |
|
friend |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |