dime
0.9.1
Portable DXF file library
|
The dimeBlocksSection class handles a BLOCKS section. More...
#include <dime/sections/BlocksSection.h>
Public Member Functions | |
dimeBlocksSection (dimeMemHandler *const memhandler=NULL) | |
virtual | ~dimeBlocksSection () |
virtual dimeSection * | copy (dimeModel *const model) const |
virtual int | countRecords () const |
void | fixReferences (dimeModel *const model) |
class dimeBlock * | getBlock (const int idx) |
int | getNumBlocks () const |
virtual const char * | getSectionName () const |
void | insertBlock (dimeBlock *const block, const int idx=-1) |
virtual bool | read (dimeInput *const file) |
void | removeBlock (const int idx) |
virtual int | typeId () const |
virtual bool | write (dimeOutput *const file) |
Public Member Functions inherited from dimeSection | |
dimeSection (dimeMemHandler *const memhandler) | |
virtual | ~dimeSection () |
virtual bool | isOfType (const int thetypeid) const |
Public Member Functions inherited from dimeBase | |
dimeBase (void) | |
virtual | ~dimeBase () |
void | operator delete (void *ptr) |
void * | operator new (size_t size, dimeMemHandler *memhandler=NULL, const int alignment=4) |
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 } |
Static Public Member Functions inherited from dimeSection | |
static dimeSection * | createSection (const char *const sectionname, dimeMemHandler *memhandler) |
Protected Attributes inherited from dimeSection | |
dimeMemHandler * | memHandler |
The dimeBlocksSection class handles a BLOCKS section.
dimeBlocksSection::dimeBlocksSection | ( | dimeMemHandler *const | memhandler = NULL | ) |
Constructor.
|
virtual |
Destructor. Should only be called when no memory handler is used.
|
virtual |
Implements dimeSection.
|
virtual |
Returns the number of records in this section.
Implements dimeSection.
void dimeBlocksSection::fixReferences | ( | dimeModel *const | model | ) |
This function should be called after loading has ended, and will find all forward BLOCK references.
dimeBlock * dimeBlocksSection::getBlock | ( | const int | idx | ) |
Returns the block at index idx.
int dimeBlocksSection::getNumBlocks | ( | ) | const |
Returns the number of blocks in this section.
|
virtual |
Implements dimeSection.
void dimeBlocksSection::insertBlock | ( | dimeBlock *const | block, |
const int | idx = -1 ) |
Inserts a new block at index idx. If idx is negative, the block will be inserted at the end of the list of blocks.
|
virtual |
This method reads a DXF BLOCKS section.
Implements dimeSection.
void dimeBlocksSection::removeBlock | ( | const int | idx | ) |
Removes (and deletes if no memory handler is used) the block at index idx.
|
virtual |
Must be implemented by all subclasses, and should return an unique id for that class.
Implements dimeSection.
|
virtual |
This method writes a DXF BLOCKS section.
Implements dimeSection.