| http://www.coin3d.org/ http://www.kongsberg.com/kogt/

Public Member Functions | List of all members
dimeHeaderSection Class Reference

The dimeHeaderSection class handles the HEADER section. More...

`#include <dime/sections/HeaderSection.h>`

Inheritance diagram for dimeHeaderSection:

## Public Member Functions

| dimeHeaderSection (dimeMemHandler *const memhandler)
virtual | ~dimeHeaderSection ()
int | getVariable (const char *const variableName, int *const groupcodes, dimeParam *const params, const int maxparams) const
int | setVariable (const char *const variableName, const int *const groupcodes, const dimeParam *const params, const int numparams, dimeMemHandler *const memhandler=NULL)
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
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 dimeSection * | createSection (const char *const sectionname, dimeMemHandler *memhandler)
Protected Attributes inherited from dimeSection
dimeMemHandler * | memHandler

## Detailed Description

The dimeHeaderSection class handles the HEADER section.

## Constructor & Destructor Documentation

## ◆ dimeHeaderSection()

dimeHeaderSection::dimeHeaderSection | ( | dimeMemHandler *const | memhandler | ) |

Constructor

Referenced by setVariable().

## ◆ ~dimeHeaderSection()

dimeHeaderSection::~dimeHeaderSection | ( |  | ) |

virtual

Destructor

References dimeArray< T >::count().

## Member Function Documentation

## ◆ countRecords()

int dimeHeaderSection::countRecords | ( |  | ) | const

virtual

Returns the number of records in this section.

Implements dimeSection.

References dimeArray< T >::count().

## ◆ getVariable()

int dimeHeaderSection::getVariable | ( | const char *const | variableName,
|  | int *const | groupcodes,
|  | dimeParam *const | params,
|  | const int | maxparams
| ) |  | const

Returns a header variable. The variable attributes are copied into the groupcodes and params arrays. No more than maxparams attributes are copied. This method returns the number of attributes copied into the arrays, or -1 if the variable could not be found.

References dimeArray< T >::count().

Referenced by dxfConverter::findHeaderVariables(), dimeModel::getDxfVersion(), and dimeModel::write().

## ◆ setVariable()

int dimeHeaderSection::setVariable | ( | const char *const | variableName,
|  | const int *const | groupcodes,
|  | const dimeParam *const | params,
|  | const int | numparams,
|  | dimeMemHandler *const | memhandler = `NULL`
| ) |  |

Sets a header variable.

If the variable already exists in the header section, its value is overwritten. Otherwise, a new variable is created and appended to the existing variables.

References dimeArray< T >::count(), dimeRecord::createRecord(), dimeHeaderSection(), dimeInput::getMemHandler(), dimeModel::getMemHandler(), dimeRecord::isEndOfSectionRecord(), dimeArray< T >::makeEmpty(), dimeRecord::readRecord(), dimeStringRecord::setString(), dimeArray< T >::shrinkToFit(), dimeOutput::writeGroupCode(), and dimeOutput::writeString().

Referenced by dimeModel::write().

## ◆ typeId()

int dimeHeaderSection::typeId | ( |  | ) | const

virtual

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

Implements dimeSection.

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

- HeaderSection.h
- HeaderSection.cpp

Copyright © by Kongsberg Oil & Gas Technologies. All rights reserved.