| http://www.coin3d.org/ http://www.kongsberg.com/kogt/

Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
dimeRecord Class Referenceabstract

The dimeRecord class is the superclass of all record classes. More...

`#include <dime/records/Record.h>`

Inheritance diagram for dimeRecord:

## Public Member Functions

| dimeRecord (const int group_code)
virtual | ~dimeRecord ()
virtual void | setValue (const dimeParam &param, dimeMemHandler *const memhandler=NULL)=0
virtual void | getValue (dimeParam &param) const =0
virtual dimeRecord * | copy (dimeMemHandler *const memhandler) const =0
void | setGroupCode (const int group_code)
int | getGroupCode () const
virtual bool | isEndOfSectionRecord () const
virtual bool | isEndOfFileRecord () const
virtual int | typeId () const =0
virtual bool | read (dimeInput *const in)=0
virtual bool | write (dimeOutput *const out)
virtual void | print () const
Public Member Functions inherited from dimeBase
| 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)

## Static Public Member Functions

static bool | readRecordData (dimeInput *const in, const int group_code, dimeParam &param)
static dimeRecord * | readRecord (dimeInput *const in)
static dimeRecord * | createRecord (const int group_code, dimeMemHandler *const memhandler)
static dimeRecord * | createRecord (const int group_code, const dimeParam &param, dimeMemHandler *const memhandler)
static int | getRecordType (const int group_code)

## Protected Attributes

int | groupCode

## Additional Inherited Members

Public Types inherited from dimeBase

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
}

## Detailed Description

The dimeRecord class is the superclass of all record classes.

## Constructor & Destructor Documentation

## ◆ dimeRecord()

dimeRecord::dimeRecord | ( | const int | group_code | ) |

Constructor which sets the group code.

## ◆ ~dimeRecord()

dimeRecord::~dimeRecord | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## ◆ copy()

dimeRecord * dimeRecord::copy | ( | dimeMemHandler *const | memhandler | ) | const

pure virtual

Returns a copy of this record.

Implemented in dimeStringRecord, dimeDoubleRecord, dimeFloatRecord, dimeInt16Record, dimeInt32Record, and dimeInt8Record.

Referenced by dimeRecordHolder::copyRecords(), and dimeUnknownSection::~dimeUnknownSection().

## ◆ createRecord()

dimeRecord * dimeRecord::createRecord | ( | const int | group_code,
|  | dimeMemHandler *const | memhandler
| ) |  |

static

Static function that creates a record based on the group code. if memhandler != NULL, it will be used to allocate the other, otherwise the default memory handler will be used.

References getRecordType(), and setValue().

Referenced by dimeTable::read(), dimeModel::read(), dimeRecordHolder::read(), readRecord(), dimeRecordHolder::setRecords(), dimeHeaderSection::setVariable(), and dimeRecordHolder::shouldWriteRecord().

## ◆ getGroupCode()

int dimeRecord::getGroupCode | ( |  | ) | const

Returns the group code for this record.

Referenced by dimeTable::insertTableRecord().

## ◆ getRecordType()

int dimeRecord::getRecordType | ( | const int | group_code | ) |

static

Static function that returns the record type based on the group code.

Referenced by createRecord(), and readRecordData().

## ◆ getValue()

void dimeRecord::getValue | ( | dimeParam & | param | ) | const

pure virtual

Returns the value of this record.

Implemented in dimeStringRecord, dimeDoubleRecord, dimeFloatRecord, dimeInt16Record, dimeInt32Record, and dimeInt8Record.

Referenced by dimeRecordHolder::getRecord().

## ◆ isEndOfFileRecord()

bool dimeRecord::isEndOfFileRecord | ( |  | ) | const

virtual

Returns true if this records is an end of file record.

Reimplemented in dimeStringRecord.

## ◆ isEndOfSectionRecord()

bool dimeRecord::isEndOfSectionRecord | ( |  | ) | const

virtual

Returns true if this record is an end of section record.

Reimplemented in dimeStringRecord.

Referenced by dimeHeaderSection::setVariable(), and dimeUnknownSection::~dimeUnknownSection().

## ◆ print()

dimeRecord::print | ( |  | ) | const

inline virtual

Prints information about this record to stderr.

## ◆ read()

bool dimeRecord::read | ( | dimeInput *const | in | ) |

pure virtual

This function will read the record from the dimeInput file.

Implemented in dimeStringRecord, dimeDoubleRecord, dimeFloatRecord, dimeInt16Record, dimeInt32Record, and dimeInt8Record.

Referenced by dimeTable::read(), and readRecord().

## ◆ readRecord()

dimeRecord * dimeRecord::readRecord | ( | dimeInput *const | in | ) |

static

Reads and returns the next record int file in.

References createRecord(), dimeInput::getMemHandler(), read(), and dimeInput::readGroupCode().

Referenced by dimeHeaderSection::setVariable(), and dimeUnknownSection::~dimeUnknownSection().

## ◆ readRecordData()

bool dimeRecord::readRecordData | ( | dimeInput *const | in,
|  | const int | group_code,
|  | dimeParam & | param
| ) |  |

static

Will read the next item from in, and store result in param, based on the group_code.

References getRecordType(), dimeInput::readDouble(), dimeInput::readFloat(), dimeInput::readInt16(), dimeInput::readInt32(), dimeInput::readInt8(), dimeInput::readString(), and dimeInput::readStringNoSkip().

Referenced by dimeRecordHolder::read().

## ◆ setGroupCode()

void dimeRecord::setGroupCode | ( | const int | group_code | ) |

Sets the group code of this record.

## ◆ setValue()

void dimeRecord::setValue | ( | const dimeParam & | param,
|  | dimeMemHandler *const | memhandler = `NULL`
| ) |  |

pure virtual

Sets the value of this record. The memory handler is needed by dimeStringRecord.

Implemented in dimeStringRecord, dimeDoubleRecord, dimeFloatRecord, dimeInt16Record, dimeInt32Record, and dimeInt8Record.

Referenced by createRecord(), dimeRecordHolder::setRecords(), and dimeRecordHolder::shouldWriteRecord().

## ◆ typeId()

int dimeRecord::typeId | ( |  | ) | const

pure virtual

This virtual function will return the type of the record.

Implements dimeBase.

Implemented in dimeStringRecord, dimeDoubleRecord, dimeFloatRecord, dimeInt16Record, dimeInt32Record, dimeInt8Record, and dimeHexRecord.

## ◆ write()

bool dimeRecord::write | ( | dimeOutput *const | out | ) |

virtual

This function will write the record to the dimeOutput file.

Reimplemented in dimeStringRecord, dimeDoubleRecord, dimeFloatRecord, dimeInt16Record, dimeInt32Record, and dimeInt8Record.

References dimeOutput::writeGroupCode().

Referenced by dimeDoubleRecord::write(), dimeFloatRecord::write(), dimeInt8Record::write(), dimeInt32Record::write(), dimeInt16Record::write(), and dimeStringRecord::write().

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

- Record.h
- Record.cpp

Copyright © by Kongsberg Oil & Gas Technologies. All rights reserved.