Holds buffers for each field in a record type.
|
Public Member Functions |
|
| RecordBuffer () |
| | Creates an empty RecordBuffer.
|
|
| RecordBuffer (RecordType *rt) |
| | Creates a RecordBuffer object with the specified record type.
|
|
| ~RecordBuffer () |
| | Destructor: Cleans up the allocated memory.
|
|
RecordBuffer * | deleteField (string fieldname) |
| | Delete a field specified by name and inherit all other buffers.
|
|
RecordBuffer * | deleteField (int fieldindex) |
| | Delete a field specified by field index and inherit all other buffers.
|
|
RecordBuffer * | deleteRange (int startfield, int endfield) |
| | Delete a range of fields & inherit all other buffers.
|
| RecordBuffer * | insertField (int position, string name, BasicType *type) |
| | Insert a new field.
|
| RecordBuffer * | insertRecord (int position, RecordBuffer *insertRecord) |
| | Inserts a new RECORD buffer.
|
| RecordBuffer * | selectFields (RecordType *selection) |
| | Creates a new buffer containing only the fields specified by the type descriptor.
|
| RecordBuffer * | selectFields (vector< int > *selection) |
| | Creates a new buffer containing only the fields specified by the field indices.
|
| RecordBuffer * | selectFields (vector< string > *selection) |
| | Creates a new buffer containing only the fields specified by the field names.
|
| RecordBuffer * | renameField (string oldname, string newname) |
| | Renames the field specified by the first argument to the name given by the second argument.
|
| RecordBuffer * | renameField (int fieldindex, string newname) |
| | Renames the field specified by the first argument to the name given by the second argument.
|
| RecordBuffer * | moveField (string fieldname, int newposition) |
| | Moves a field (specified by name) to a new position (specified by index) and "slides" the fields in between to fill in the vacated position.
|
| RecordBuffer * | moveField (int oldposition, int newposition) |
| | Moves a field (specified by index) to a new position (specified by index) and "slides" the fields in between to fill in the vacated position.
|
|
TypedBuffer * | getFieldBuffer (int fieldindex) |
| | Returns the buffer of the field (specified by field index).
|
|
TypedBuffer * | getFieldBuffer (string fieldname) |
| | Returns the buffer of the field (specified by field name).
|
|
bool | hasValue (string fieldname) |
| | The returns true if the field specified by name contains a value.
|
|
bool | hasValue (int fieldindex) |
| | The returns true if the field specified by index contains a value.
|
|
bool | hasValue () |
| | Returns true if ALL fields have a value.
|
|
void | reset () |
| | Forgets all values the buffer may be holding.
|
|
int | getFieldIndex (string fieldname) |
| | Get the field number from a field name.
|
|
string | getFieldName (int fieldindex) |
| | Get the name of a field from a field number.
|
|
bool | isValidFieldIndex (int fieldindex) |
| | Says whether the field index is legal for this type.
|
|
bool | isValidFieldName (string fieldname) |
| | Says whether a field with this name exists in the type.
|
|
BasicType * | getFieldType (int fieldindex) |
| | Get the type of a field specified by number.
|
|
BasicType * | getFieldType (string fieldindex) |
| | Get the type of a field specified by name.
|
|
int | numFields () |
| | Returns the total number of fields in the type.
|
|
string | toString () |
| | Returns a string representation of the type.
|
|
RecordType * | getType () |
| | Returns the record type descriptor.
|
|
These methods return the value contained in the buffer.
The type of the field must match the type required by the method and the buffer must have a value.
|
|
string | getStringValue (int fieldindex) |
|
int | getIntValue (int fieldindex) |
|
double | getRealValue (int fieldindex) |
|
bool | getBoolValue (int fieldindex) |
|
string | getStringValue (string fieldname) |
|
int | getIntValue (string fieldname) |
|
double | getRealValue (string fieldname) |
|
bool | getBoolValue (string fieldname) |
|
vector< int > | getIntArrayValue (int fieldindex) |
|
vector< double > | getRealArrayValue (int fieldindex) |
|
vector< bool > | getBoolArrayValue (int fieldindex) |
|
These methods are used to set the value of a field.
The type of the field must match the type required by the method.
|
|
void | setStringValue (int fieldindex, string value) |
|
void | setIntValue (int fieldindex, int value) |
|
void | setRealValue (int fieldindex, double value) |
|
void | setBoolValue (int fieldindex, bool value) |
|
void | setStringValue (string fieldname, string value) |
|
void | setIntValue (string fieldname, int value) |
|
void | setRealValue (string fieldname, double value) |
|
void | setBoolValue (string fieldname, bool value) |
|
void | setIntArrayValue (int fieldindex, vector< int >) |
|
void | setRealArrayValue (int fieldindex, vector< double >) |
|
void | setBoolArrayValue (int fieldindex, vector< bool >) |
Friends |
|
class | boost::serialization::access |
Holds buffers for each field in a record type.