![]() |
http://www.coin3d.org/ http://www.kongsberg.com/kogt/ |
The dimeTable class stores table entries. More...
#include <dime/tables/Table.h>
Public Member Functions | |
dimeTable (dimeMemHandler *const memhandler) | |
virtual | ~dimeTable () |
bool | read (dimeInput *const in) |
bool | write (dimeOutput *const out) |
dimeTable * | copy (dimeModel *const model) const |
int | typeId () const |
int | countRecords () const |
int | tableType () const |
void | setTableName (const char *name) |
const char * | tableName () const |
int | getNumTableEntries () const |
dimeTableEntry * | getTableEntry (const int idx) |
void | insertTableEntry (dimeTableEntry *const tableEntry, const int idx=-1) |
void | removeTableEntry (const int idx) |
int | getNumTableRecords () const |
dimeRecord * | getTableRecord (const int idx) |
void | insertTableRecord (dimeRecord *const record, const int idx=-1) |
void | removeTableRecord (const int idx) |
![]() | |
dimeBase (void) | |
virtual | ~dimeBase () |
virtual bool | isOfType (const int thetypeid) const |
void * | operator new (size_t size, dimeMemHandler *memhandler=NULL, const int alignment=4) |
void | operator delete (void *ptr) |
Additional Inherited Members | |
![]() | |
enum | { dimeBaseType = 1, dimeRecordType, dimeStringRecordType, dimeFloatRecordType, dimeDoubleRecordType, dimeInt8RecordType, dimeInt16RecordType, dimeInt32RecordType, dimeHexRecordType, dimeRecordHolderType, dimeClassType, dimeUnknownClassType, dimeObjectType, dimeUnknownObjectType, dimeEntityType, dimeUnknownEntityType, dimePolylineType, dimeVertexType, dimeFaceEntityType, dimeExtrusionEntityType, dime3DFaceType, dimeSolidType, dimeTraceType, dimeLineType, dimeTextType, dimePointType, dimeBlockType, dimeInsertType, dimeCircleType, dimeArcType, dimeLWPolylineType, dimeEllipseType, dimeSplineType, dimeSectionType, dimeUnknownSectionType, dimeEntitiesSectionType, dimeBlocksSectionType, dimeTablesSectionType, dimeHeaderSectionType, dimeClassesSectionType, dimeObjectsSectionType, dimeTableType, dimeTableEntryType, dimeUnknownTableType, dimeUCSTableType, dimeLayerTableType, dimeLastTypeTag } |
The dimeTable class stores table entries.
This class will not be allocated by the memory handler, but it will store a pointer to the memory handler, and it will be used to allocate table entries and records.
dimeTable::dimeTable | ( | dimeMemHandler *const | memhandler | ) |
Constructor.
|
virtual |
Destructor.
References dimeArray< T >::count().
int dimeTable::countRecords | ( | ) | const |
Counts the number of records in this table.
References dimeArray< T >::count().
int dimeTable::getNumTableEntries | ( | ) | const |
Returns the number of table enties in this table.
References dimeArray< T >::count().
int dimeTable::getNumTableRecords | ( | ) | const |
Returns the number of table records in this table. Table records precedes the table entries, and contain som information about this table. The max. entries record (group code 70), is handled automatically by this class, and should not be set by the user.
References dimeArray< T >::count().
dimeTableEntry * dimeTable::getTableEntry | ( | const int | idx | ) |
Returns the table entry at index idx.
References dimeArray< T >::count().
dimeRecord * dimeTable::getTableRecord | ( | const int | idx | ) |
Returns the table record at index idx.
References dimeArray< T >::count().
void dimeTable::insertTableEntry | ( | dimeTableEntry *const | tableEntry, |
const int | idx = -1 |
||
) |
Inserts a new table entry at index idx. If idx is negative, the table entry will be inserted at the end of the list of tableEntries.
References dimeArray< T >::count().
void dimeTable::insertTableRecord | ( | dimeRecord *const | record, |
const int | idx = -1 |
||
) |
Inserts a new record at index idx. If idx is negative, the record will be inserted at the end of the list of records.
References dimeArray< T >::count(), dimeRecord::getGroupCode(), and dimeStringRecord::getString().
bool dimeTable::read | ( | dimeInput *const | file | ) |
Reads a table.
References dimeRecord::createRecord(), dimeTableEntry::createTableEntry(), dimeInput::getMemHandler(), dimeArray< T >::makeEmpty(), dimeTableEntry::read(), dimeRecord::read(), dimeInput::readGroupCode(), dimeInput::readInt16(), dimeInput::readString(), and dimeArray< T >::shrinkToFit().
Referenced by dimeTablesSection::read().
void dimeTable::removeTableEntry | ( | const int | idx | ) |
Removes (and deletes if no memhandler is used) the table entry at index idx.
References dimeArray< T >::count(), and dimeArray< T >::removeElem().
void dimeTable::removeTableRecord | ( | const int | idx | ) |
Removes (and deletes if no memhandler is used) the record at index idx.
References dimeArray< T >::count(), and dimeArray< T >::removeElem().
|
virtual |
Must be implemented by all subclasses, and should return an unique id for that class.
Implements dimeBase.
bool dimeTable::write | ( | dimeOutput *const | file | ) |
Writes the table to file.
References dimeArray< T >::count(), dimeOutput::writeGroupCode(), dimeOutput::writeInt16(), and dimeOutput::writeString().
Copyright © by Kongsberg Oil & Gas Technologies. All rights reserved.
Generated on Thu Nov 20 2014 11:11:43 for Dime by Doxygen 1.8.8.