Coin Logo Coin3D is Free Software,
published under the BSD 3-clause license.
https://bitbucket.org/Coin3D/
http://www.kongsberg.com/kogt/
dimeBlocksSection Class Reference

The dimeBlocksSection class handles a BLOCKS section. More...

#include <dime/sections/BlocksSection.h>

Inheritance diagram for dimeBlocksSection:
dimeSection dimeBase

Public Member Functions

 dimeBlocksSection (dimeMemHandler *const memhandler=NULL)
 
virtual ~dimeBlocksSection ()
 
virtual const char * getSectionName () const
 
virtual dimeSectioncopy (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 getNumBlocks () const
 
class dimeBlockgetBlock (const int idx)
 
void removeBlock (const int idx)
 
void insertBlock (dimeBlock *const block, const int idx=-1)
 
- 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 new (size_t size, dimeMemHandler *memhandler=NULL, const int alignment=4)
 
void operator delete (void *ptr)
 

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 dimeBlocksSection class handles a BLOCKS section.

Constructor & Destructor Documentation

◆ dimeBlocksSection()

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

Constructor which stores the sectioname.

◆ ~dimeBlocksSection()

dimeBlocksSection::~dimeBlocksSection ( )
virtual

Destructor. Should only be called when no memhandler is used.

Member Function Documentation

◆ read()

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

This method reads a DXF BLOCKS section.

Implements dimeSection.

◆ write()

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

This method writes a DXF BLOCKS section.

Implements dimeSection.

◆ typeId()

int dimeBlocksSection::typeId ( ) const
virtual

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

Implements dimeSection.

◆ countRecords()

int dimeBlocksSection::countRecords ( ) const
virtual

Returns the number of records in this section.

Implements dimeSection.

◆ fixReferences()

void dimeBlocksSection::fixReferences ( dimeModel *const  model)

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

◆ getNumBlocks()

int dimeBlocksSection::getNumBlocks ( ) const

Returns the number of blocks in this section.

◆ getBlock()

dimeBlock * dimeBlocksSection::getBlock ( const int  idx)

Returns the block at index idx.

◆ removeBlock()

void dimeBlocksSection::removeBlock ( const int  idx)

Removes (and deletes if no memhandler is used) the block at index idx.

◆ insertBlock()

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.


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