![]() |
http://www.coin3d.org/ http://www.kongsberg.com/kogt/ |
The dimeArray class is internal / private. More...
#include <dime/util/Array.h>
Public Member Functions | |
dimeArray (const int initsize=4) | |
void | append (const T &value) |
void | append (const dimeArray< T > &array) |
void | prepend (const dimeArray< T > &array) |
void | insertElem (const int idx, const T &value) |
void | setElem (const int index, const T &value) |
T | getElem (const int index) const |
void | getElem (const int index, T &elem) const |
T | getLastElem () const |
void | getLastElem (T &elem) const |
T & | operator[] (const int index) |
T | operator[] (const int index) const |
void | removeElem (const int index) |
void | removeElemFast (const int index) |
void | reverse () |
void | setCount (const int count) |
void | makeEmpty (const int initsize=4) |
void | freeMemory () |
int | count () const |
int | allocSize () const |
T * | arrayPointer () |
const T * | constArrayPointer () const |
void | shrinkToFit () |
The dimeArray class is internal / private.
The dimeArray class is a container class for a growable array. Whenever the allocated space for the array becomes too small, the array is moved to a memory block that is twice as large. This class is dangerous to use, because it does not check for bounds and other things for efficiency reasons. Inspect the source code - don't assume anything...
|
inline |
This method returns the size allocated for the array.
|
inline |
This method returns a pointer to the allocated array.
|
inline |
This method returns a pointer to the allocated array.
Referenced by dimeBlock::copy(), and dimeEntitiesSection::~dimeEntitiesSection().
|
inline |
This method returns the number of elements in the array.
Referenced by dimeModel::addLayer(), dxfLayerData::addLine(), dimeBSPTree::addPoint(), dimeModel::copy(), dimeBlock::copy(), dimeTablesSection::countRecords(), dimeBlocksSection::countRecords(), dimeEntitiesSection::countRecords(), dimeClassesSection::countRecords(), dimeObjectsSection::countRecords(), dimeTable::countRecords(), dimeHeaderSection::countRecords(), dimeModel::countRecords(), dimeBlock::countRecords(), dimeModel::findSection(), dimeBlocksSection::fixReferences(), dimeEntitiesSection::fixReferences(), dimeBlock::fixReferences(), dimeBlocksSection::getBlock(), dimeClassesSection::getClass(), dimeEntitiesSection::getEntity(), dimeModel::getLayer(), dimeBlocksSection::getNumBlocks(), dimeClassesSection::getNumClasses(), dimeEntitiesSection::getNumEntities(), dimeModel::getNumLayers(), dimeObjectsSection::getNumObjects(), dimeModel::getNumSections(), dimeTable::getNumTableEntries(), dimeTable::getNumTableRecords(), dimeTablesSection::getNumTables(), dimeObjectsSection::getObject(), dimeBSPTree::getPoint(), dimeModel::getSection(), dimeTablesSection::getTable(), dimeTable::getTableEntry(), dimeTable::getTableRecord(), dimeBSPTree::getUserData(), dimeHeaderSection::getVariable(), dimeBlocksSection::insertBlock(), dimeClassesSection::insertClass(), dimeEntitiesSection::insertEntity(), dimeBlock::insertEntity(), dimeObjectsSection::insertObject(), dimeModel::insertSection(), dimeTablesSection::insertTable(), dimeTable::insertTableEntry(), dimeTable::insertTableRecord(), dimeBSPTree::numPoints(), dimeTablesSection::read(), dimeInsert::read(), dimeRecordHolder::read(), dimePolyline::read(), dimeBlocksSection::removeBlock(), dimeClassesSection::removeClass(), dimeEntitiesSection::removeEntity(), dimeBlock::removeEntity(), dimeObjectsSection::removeObject(), dimeBSPTree::removePoint(), dimeModel::removeSection(), dimeTablesSection::removeTable(), dimeTable::removeTableEntry(), dimeTable::removeTableRecord(), dimeArray< T >::setCount(), dimeRecordHolder::setRecords(), dimeBSPTree::setUserData(), dimeHeaderSection::setVariable(), dimeBlock::traverse(), dimeTable::typeId(), dimeBlocksSection::write(), dimeTable::write(), dimeModel::write(), dimeBlock::write(), dxfLayerData::writeWrl(), dimeBlock::~dimeBlock(), dimeBlocksSection::~dimeBlocksSection(), dimeClassesSection::~dimeClassesSection(), dimeEntitiesSection::~dimeEntitiesSection(), dimeHeaderSection::~dimeHeaderSection(), dimeModel::~dimeModel(), dimeObjectsSection::~dimeObjectsSection(), dimeTable::~dimeTable(), dimeTablesSection::~dimeTablesSection(), and dimeUnknownSection::~dimeUnknownSection().
|
inline |
This method frees all the memory used by the class. The dimeArray class is probably unusable afterwards.
|
inline |
This method makes the logical array empty, and deallocates the memory used by it, only allocating space for a small array of size initsize.
Referenced by dimeBSPTree::clear(), dimeEntity::copyEntityArray(), dimeTable::read(), dimeBlock::read(), dimeHeaderSection::setVariable(), dimeClassesSection::~dimeClassesSection(), dimeEntitiesSection::~dimeEntitiesSection(), dimeObjectsSection::~dimeObjectsSection(), dimeTable::~dimeTable(), and dimeTablesSection::~dimeTablesSection().
|
inline |
This method removes an element from the array, moving all subsequent elements one position up.
Referenced by dimeBlocksSection::removeBlock(), dimeClassesSection::removeClass(), dimeEntitiesSection::removeEntity(), dimeBlock::removeEntity(), dimeObjectsSection::removeObject(), dimeModel::removeSection(), dimeTablesSection::removeTable(), dimeTable::removeTableEntry(), and dimeTable::removeTableRecord().
|
inline |
This method removes an element from the array, and moves the last element into its place at the same index. The order of the elements is distorted, in other words.
|
inline |
This method sets the logical size of the array to count without changing the size of the array. Do not increase the array size with this function! This method is useful for reusing an array that will grow to approximately the same size each time it is used.
References dimeArray< T >::count().
Referenced by dimeEntity::copyEntityArray(), dimeFaceEntity::extractGeometry(), dimeArc::extractGeometry(), dimeEntity::extractGeometry(), dimePolyline::extractGeometry(), dimeModel::init(), and dimeInput::~dimeInput().
|
inline |
This method moves the array into a memory block exactly the same size of the array. This will free up any overhead caused by the array doubling mechanism.
Referenced by dimeBlock::fitEntities(), dimeTable::read(), dimeBlock::read(), and dimeHeaderSection::setVariable().
Copyright © by Kongsberg Oil & Gas Technologies. All rights reserved.
Generated on Thu Jan 14 2016 09:23:20 for Dime by Doxygen 1.8.11.