![]() |
Coin3D is Free Software, published under the BSD 3-clause license. |
https://bitbucket.org/Coin3D/ http://www.kongsberg.com/kogt/ |
The dimeEntitiesSection class handles an ENTITIES section. More...
#include <dime/sections/EntitiesSection.h>
Public Member Functions | |
dimeEntitiesSection (dimeMemHandler *const memhandler=NULL) | |
virtual | ~dimeEntitiesSection () |
virtual const char * | getSectionName () const |
virtual dimeSection * | copy (dimeModel *const model) const |
virtual bool | read (dimeInput *const file) |
virtual bool | write (dimeOutput *const file) |
virtual int | typeId () const |
virtual int | countRecords () const |
void | fixReferences (dimeModel *const model) |
int | getNumEntities () const |
dimeEntity * | getEntity (const int idx) |
void | removeEntity (const int idx) |
void | insertEntity (dimeEntity *const entity, const int idx=-1) |
![]() | |
dimeSection (dimeMemHandler *const memhandler) | |
virtual | ~dimeSection () |
virtual bool | isOfType (const int thetypeid) const |
![]() | |
dimeBase (void) | |
virtual | ~dimeBase () |
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 } |
![]() | |
static dimeSection * | createSection (const char *const sectionname, dimeMemHandler *memhandler) |
![]() | |
dimeMemHandler * | memHandler |
The dimeEntitiesSection class handles an ENTITIES section.
dimeEntitiesSection::dimeEntitiesSection | ( | dimeMemHandler *const | memhandler = NULL | ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
Must be implemented by all subclasses, and should return an unique id for that class.
Implements dimeSection.
|
virtual |
Returns the number of records in this section.
Implements dimeSection.
void dimeEntitiesSection::fixReferences | ( | dimeModel *const | model | ) |
This function should be called after loading has ended, and will find all forward BLOCK references.
int dimeEntitiesSection::getNumEntities | ( | ) | const |
Returns the number of entities in this section. Be aware that a POLYLINE entity with attached VERTEX entities will count as a single entity.
dimeEntity * dimeEntitiesSection::getEntity | ( | const int | idx | ) |
Returns the entity at index idx.
void dimeEntitiesSection::removeEntity | ( | const int | idx | ) |
Removes (and deletes if no memhandler is used) the entity at index idx.
void dimeEntitiesSection::insertEntity | ( | dimeEntity *const | entity, |
const int | idx = -1 |
||
) |
Inserts a new entity at index idx. If idx is negative, the entity will be inserted at the end of the list of entities.
Entities should never be allocated on the stack. Use the new and delete operators to create/destroy entities.