Class hierarchy   Compound list   Header files   Member list  

dimeModel Class Reference

The dimeModel class organizes a model. More...

#include <Model.h>

List of all members.

Public Members

Static Public Members


Detailed Description

The dimeModel class organizes a model.


Member Function Documentation

dimeModel::dimeModel()

Constructor.

dimeModel::~dimeModel()

Destructor.

dimeModel* dimeModel::copy() const

Returns a copy of the model.

bool dimeModel::read(dimeInput * const in)

Reads the model file into the internal structures.

bool dimeModel::write(dimeOutput * const out)

Writes the model to file. Currently only DXF files are supported, but hopefullt DWG will be supported soon.

int dimeModel::countRecords() const

Counts the number of records in the file. Useful if you need progress information while writing the file to disk.

See also:
dimeOutput::setCallback()

bool dimeModel::traverseEntities(dimeCallback callback, void *userdata, bool traverseBlocksSection, bool explodeInserts, bool traversePolylineVertices)

Traverses all entities in the model.

const char* dimeModel::addReference(const char * const name, void *id)

Adds a reference in this model's dictionary. Used by BLOCK and INSERT entities to resolve references, but can also be used for other purposes.

void* dimeModel::findReference(const char * const name) const

Finds a reference from the dictionary.

const char* dimeModel::findRefStringPtr(const char * const name) const

Finds a pointer to a string in the dictionary.

void dimeModel::removeReference(const char * const name)

Removes a reference from the dictionary.

dimeMemHandler* dimeModel::getMemHandler()

Returns a pointer to the memory handler used for this model.

int dimeModel::getNumLayers() const

Returns the number of layers in the model. A default layer will always be created. It is called "Default DIME layer", and it has layer id number 0. All other layers are assigned running numbers from 1.

See also:
dimeLayer::getLayerNum() , dimeModel::getLayer()

const dimeLayer* dimeModel::getLayer(const int idx) const

Returns the layer at index idx.

See also:
dimeModel::getNumLayers()

const dimeLayer* dimeModel::getLayer(const char * const layername) const

Returns the layer with name layername. Returns NULL if no layer by that name is found.

const dimeLayer* dimeModel::addLayer(const char * const name, const int16 colnum, const int16 flags)

Adds a layer to the list of layers. If the layer allready exists, a pointer to the existing layer will be returned.

const char* dimeModel::getDxfVersion() const

Returns the AutoCAD drawing database version number. This function return NULL if no version number is found in the file. Currently (directly) supported versions are: r10, r11/r12, r13 and r14.

const char* dimeModel::addBlock(const char * const blockname, dimeBlock * const block)

Use this to add a block to the model. Make sure you also add it in the BLOCKS section.

dimeBlock* dimeModel::findBlock(const char * const blockname)

Returns a pointer to the block with name blockname, or NULL if no block with that name exists.

dimeSection* dimeModel::findSection(const char * const sectionname)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

const dimeSection* dimeModel::findSection(const char * const sectionname) const

Finds the section with section sectionname. Currently (directly) supported sections are HEADER, CLASSES, TABLES, BLOCKS, ENTITIES and OBJECTS.

int dimeModel::getNumSections() const

Returns the number of sections in the model.

See also:
dimeModel::getSection()

dimeSection* dimeModel::getSection(const int idx)

Returns the section at index idx.

See also:
dimeModel::getNumSections()

void dimeModel::insertSection(dimeSection * const section, const int idx)

Inserts a new section to the list of sections. The argument idx, specifies the target position of the new section in the list of sections. If idx is negative, the section will be placed at the end of the list.

void dimeModel::removeSection(const int idx)

Removes a section from the list of sections.

const char* dimeModel::getVersionString() [static]

This method returns a string saying which version of DIME is used.j


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.