dime  0.9.1
Portable DXF file library
Loading...
Searching...
No Matches
dimeRecord Class Referenceabstract

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

#include <dime/records/Record.h>

Inheritance diagram for dimeRecord:
dimeBase dimeDoubleRecord dimeFloatRecord dimeInt16Record dimeInt32Record dimeInt8Record dimeStringRecord dimeHexRecord

Public Member Functions

 dimeRecord (const int group_code)
 
virtual ~dimeRecord ()
 
virtual dimeRecordcopy (dimeMemHandler *const memhandler) const =0
 
int getGroupCode () const
 
virtual void getValue (dimeParam &param) const =0
 
virtual bool isEndOfFileRecord () const
 
virtual bool isEndOfSectionRecord () const
 
virtual void print () const
 
virtual bool read (dimeInput *const in)=0
 
void setGroupCode (const int group_code)
 
virtual void setValue (const dimeParam &param, dimeMemHandler *const memhandler=NULL)=0
 
virtual int typeId () const =0
 
virtual bool write (dimeOutput *const out)
 
- Public Member Functions inherited from dimeBase
 dimeBase (void)
 
virtual ~dimeBase ()
 
virtual bool isOfType (const int thetypeid) const
 
void operator delete (void *ptr)
 
void * operator new (size_t size, dimeMemHandler *memhandler=NULL, const int alignment=4)
 

Static Public Member Functions

static dimeRecordcreateRecord (const int group_code, const dimeParam &param, dimeMemHandler *const memhandler)
 
static dimeRecordcreateRecord (const int group_code, dimeMemHandler *const memhandler)
 
static int getRecordType (const int group_code)
 
static dimeRecordreadRecord (dimeInput *const in)
 
static bool readRecordData (dimeInput *const in, const int group_code, dimeParam &param)
 

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 dimeDoubleRecord, dimeFloatRecord, dimeInt16Record, dimeInt32Record, dimeInt8Record, and dimeStringRecord.

◆ 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.

◆ getGroupCode()

int dimeRecord::getGroupCode ( ) const

Returns the group code for this record.

◆ getRecordType()

int dimeRecord::getRecordType ( const int group_code)
static

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

◆ getValue()

void dimeRecord::getValue ( dimeParam & param) const
pure virtual

Returns the value of this record.

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

◆ isEndOfFileRecord()

bool dimeRecord::isEndOfFileRecord ( ) const
virtual

Returns true if this record 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.

◆ print()

dimeRecord::print ( ) const
inlinevirtual

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 dimeDoubleRecord, dimeFloatRecord, dimeInt16Record, dimeInt32Record, dimeInt8Record, and dimeStringRecord.

◆ readRecord()

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

Reads and returns the next record int file in.

◆ 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.

◆ 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 dimeDoubleRecord, dimeFloatRecord, dimeInt16Record, dimeInt32Record, dimeInt8Record, and dimeStringRecord.

◆ typeId()

int dimeRecord::typeId ( ) const
pure virtual

This virtual function will return the type of the record.

Implements dimeBase.

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

◆ write()

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

This function will write the record to the dimeOutput file.

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


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