dime  0.9.1
Portable DXF file library
Loading...
Searching...
No Matches
dimeEntitiesSection Class Reference

The dimeEntitiesSection class handles an ENTITIES section. More...

#include <dime/sections/EntitiesSection.h>

Inheritance diagram for dimeEntitiesSection:
dimeSection dimeBase

Public Member Functions

 dimeEntitiesSection (dimeMemHandler *const memhandler=NULL)
 
virtual ~dimeEntitiesSection ()
 
virtual dimeSectioncopy (dimeModel *const model) const
 
virtual int countRecords () const
 
void fixReferences (dimeModel *const model)
 
dimeEntitygetEntity (const int idx)
 
int getNumEntities () const
 
virtual const char * getSectionName () const
 
void insertEntity (dimeEntity *const entity, const int idx=-1)
 
virtual bool read (dimeInput *const file)
 
void removeEntity (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 dimeSectioncreateSection (const char *const sectionname, dimeMemHandler *memhandler)
 
- Protected Attributes inherited from dimeSection
dimeMemHandlermemHandler
 

Detailed Description

The dimeEntitiesSection class handles an ENTITIES section.

Constructor & Destructor Documentation

◆ dimeEntitiesSection()

dimeEntitiesSection::dimeEntitiesSection ( dimeMemHandler *const memhandler = NULL)

Constructor.

◆ ~dimeEntitiesSection()

dimeEntitiesSection::~dimeEntitiesSection ( )
virtual

Destructor.

Member Function Documentation

◆ copy()

dimeSection * dimeEntitiesSection::copy ( dimeModel *const model) const
virtual

Implements dimeSection.

◆ countRecords()

int dimeEntitiesSection::countRecords ( ) const
virtual

Returns the number of records in this section.

Implements dimeSection.

◆ fixReferences()

void dimeEntitiesSection::fixReferences ( dimeModel *const model)

This function should be called after loading has ended, and will find all forward BLOCK references.

◆ getEntity()

dimeEntity * dimeEntitiesSection::getEntity ( const int idx)

Returns the entity at index idx.

◆ getNumEntities()

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.

◆ getSectionName()

const char * dimeEntitiesSection::getSectionName ( ) const
virtual

Implements dimeSection.

◆ insertEntity()

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.

◆ read()

bool dimeEntitiesSection::read ( dimeInput *const file)
virtual

Implements dimeSection.

◆ removeEntity()

void dimeEntitiesSection::removeEntity ( const int idx)

Removes (and deletes if no memory handler is used) the entity at index idx.

◆ typeId()

int dimeEntitiesSection::typeId ( ) const
virtual

Must be implemented by all subclasses, and should return an unique id for that class.

Implements dimeSection.

◆ write()

bool dimeEntitiesSection::write ( dimeOutput *const file)
virtual

Implements dimeSection.


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