Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

dimeExtrusionEntity Class Reference

The dimeExtrusionEntity class is the superclass of all entity classes with extrusion data. More...

#include <dime/entities/ExtrusionEntity.h>

Inheritance diagram for dimeExtrusionEntity:

dimeEntity dimeRecordHolder dimeBase dimeArc dimeCircle dimeEllipse dimeLine dimeLWPolyline dimePoint dimePolyline List of all members.

Public Member Functions

 dimeExtrusionEntity ()
virtual bool getRecord (const int groupcode, dimeParam &param, const int index=0) const
void setExtrusionDir (const dimeVec3f &v)
const dimeVec3fgetExtrusionDir () const
void setThickness (const dxfdouble val)
dxfdouble getThickness () const
virtual int typeId () const
virtual bool isOfType (const int thtypeid) const
virtual int countRecords () const

Protected Member Functions

virtual bool handleRecord (const int groupcode, const dimeParam &param, dimeMemHandler *const memhandler)
void copyExtrusionData (const dimeExtrusionEntity *const entity)
bool writeExtrusionData (dimeOutput *const out)

Protected Attributes

dimeVec3f extrusionDir
dxfdouble thickness

Detailed Description

The dimeExtrusionEntity class is the superclass of all entity classes with extrusion data.


Constructor & Destructor Documentation

dimeExtrusionEntity::dimeExtrusionEntity  ) 
 

Constructor. Will initialize the extrusion direction to (0,0,1) and the thickness to 0.0.


Member Function Documentation

void dimeExtrusionEntity::copyExtrusionData const dimeExtrusionEntity *const   entity  )  [protected]
 

Copies all extrusion data from entity.

int dimeExtrusionEntity::countRecords  )  const [virtual]
 

Returns the number of records in the record holder. Should be overloaded by subclasses which should count their records, and then call the parent's method. This method is used to precalculate the number of records to be written. Very useful when progress information is needed during write().

Reimplemented from dimeEntity.

Reimplemented in dimeArc, dimeCircle, dimeEllipse, dimeLine, dimeLWPolyline, dimePoint, and dimePolyline.

const dimeVec3f & dimeExtrusionEntity::getExtrusionDir  )  const [inline]
 

Returns the extrusion direction.

bool dimeExtrusionEntity::getRecord const int  groupcode,
dimeParam param,
const int  index = 0
const [virtual]
 

Will return the value of the record with group code groupcode. false is returned if the record could not be found. Subclasses should overload this method if one or several records are stored in the class. If the groupcode queried is not stored internally, the subclass should call its parent's method.

Reimplemented from dimeEntity.

Reimplemented in dimeArc, dimeCircle, dimeEllipse, dimeLine, dimeLWPolyline, dimePoint, and dimePolyline.

dxfdouble dimeExtrusionEntity::getThickness  )  const [inline]
 

Returns the extrusion thickness.

bool dimeExtrusionEntity::handleRecord const int  groupcode,
const dimeParam param,
dimeMemHandler *const   memhandler
[protected, virtual]
 

Must be overloaded by entities that directly supports a record type. During dimeRecordHolder::read(), dimeRecordHolder::setRecord and dimeRecordHolder::setRecords, this function is called for every record found, and it is up to the subclass if the record should be stored internally, or if a generic record should be created and stored in this superclass. A subclass should return when it will handle the record, false otherwise. Default function does nothing, and returns false.

For entities, records with group codes 8 (layer name) and 62 (color number) are automatically handled by the dimeEntity class.

See also:
dimeRecordHolder::read()

dimeRecordHolder::setRecord()

Reimplemented from dimeEntity.

Reimplemented in dimeArc, dimeCircle, dimeEllipse, dimeLine, dimeLWPolyline, dimePoint, and dimePolyline.

bool dimeExtrusionEntity::isOfType const int  thetypeid  )  const [virtual]
 

Returns true if the object is of type typeid or is inherited from it. Function in base class checks whether thetypeid equals the virtual dimeBase::typeId() value or equals dimeBaseType. Must be implemented by all subclasses that are superclasses of other classes, and should check if thetypeid equals its typeId, and then call its parent's isOfType function. Leaf-classes do not have to implement this method.

Reimplemented from dimeEntity.

void dimeExtrusionEntity::setExtrusionDir const dimeVec3f v  )  [inline]
 

Sets the extrusion direction. Default value is (0,0,1).

void dimeExtrusionEntity::setThickness const dxfdouble  val  )  [inline]
 

Sets the extrusion thickness. Default value is 0.0.

int dimeExtrusionEntity::typeId  )  const [virtual]
 

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

Implements dimeBase.

Reimplemented in dimeArc, dimeCircle, dimeEllipse, dimeLine, dimeLWPolyline, dimePoint, and dimePolyline.

bool dimeExtrusionEntity::writeExtrusionData dimeOutput *const   file  )  [protected]
 

Will write the extrusion and thickness records.


The documentation for this class was generated from the following files:
Copyright © 1998-1999, Systems In Motion <sales@sim.no>. All rights reserved.
System documentation was generated using doxygen.