COLLADA 1.4 DOM: daeArray Class Reference

COLLADA

daeArray Class Reference

#include <daeArray.h>

Inheritance diagram for daeArray:

Inheritance graph
[legend]
Collaboration diagram for daeArray:

Collaboration graph
[legend]
List of all members.

Detailed Description

COLLADA C++ class that implements storage for resizable array containers.

Public Member Functions

 daeArray ()
 Constructor.
 daeArray (const daeArray &cpy)
 Copy Constructor.
virtual ~daeArray ()
 Destructor.
virtual void clear ()
 Clears the contents of the array.
void setElementSize (size_t elementSize)
 Sets the size of an element in the array when creating a daeArray of a specific type.
void setRawCount (size_t cnt)
 Grows the array to the specified size and sets the daeArray to that size.
size_t getCapacity () const
 Gets the current capacity of the array, the biggest it can get without incurring a realloc.
size_t getCount () const
 Gets the number of items stored in this daeArray.
size_t getElementSize () const
 Gets the size of an element in this array.
daeMemoryRef getRawData () const
 Gets a pointer to the memory where the raw data for this daeArray is stored.
void grow (size_t sz)
 Increases the size of the daeArray.
virtual daeInt removeIndex (size_t index)
 Removes an item at a specific index in the daeArray.

Protected Attributes

size_t _count
size_t _capacity
daeMemoryRef _data
size_t _elementSize
daeAtomicType_type

Member Function Documentation

void daeArray::clear  )  [virtual]
 

Clears the contents of the array.

Do not use this function if the array contains daeSmartRef objects and the dom* class the array belongs to has a _contents member.

Many dom* objects have a _contents member that stores the original creation order of the daeElements that are their children. If you use clear() on a daeArray of daeSmartRef derived objects, these objects will not be removed from _contents, which can cause problems when you save the data. We recommended that clear() not be used on arrays that are part of a dom* object.

Reimplemented in daeTArray< T >, daeTArray< domExtraRef >, daeTArray< domScaleRef >, daeTArray< domShaderRef >, daeTArray< daeMetaElementAttribute * >, daeTArray< domAuthorRef >, daeTArray< daeString >, daeTArray< domBoundingboxRef >, daeTArray< domPRef >, daeTArray< domTrianglesRef >, daeTArray< domSource_dataRef >, daeTArray< domBool_arrayRef >, daeTArray< domPassRef >, daeTArray< domTranslateRef >, daeTArray< daeMetaAttribute * >, daeTArray< domCommentsRef >, daeTArray< domSubjectRef >, daeTArray< domArrayRef >, daeTArray< domTechniqueRef >, daeTArray< domPerspectiveRef >, daeTArray< daeBool >, daeTArray< domParamRef >, daeTArray< domPolygonsRef >, daeTArray< domEntryRef >, daeTArray< domProgramRef >, daeTArray< domLightRef >, daeTArray< domControllerRef >, daeTArray< daeStringRefArray >, daeTArray< domChannelRef >, daeTArray< domAccessorRef >, daeTArray< domAnimationRef >, daeTArray< domNodeRef >, daeTArray< daeURIResolver * >, daeTArray< domUp_axisRef >, daeTArray< domSourceRef >, daeTArray< domRotateRef >, daeTArray< domLookatRef >, daeTArray< domLinestripsRef >, daeTArray< domCodeRef >, daeTArray< domSamplerRef >, daeTArray< domRevisionRef >, daeTArray< domHRef >, daeTArray< domCopyrightRef >, daeTArray< daeChar >, daeTArray< daeMetaElementAttributeRef >, daeTArray< daeIDRefResolver * >, daeTArray< domInputRef >, daeTArray< daeMetaElementRef >, daeTArray< domCreatedRef >, daeTArray< domFloat_arrayRef >, daeTArray< domTextureRef >, daeTArray< domTristripsRef >, daeTArray< domTitleRef >, daeTArray< domAuthoring_toolRef >, daeTArray< daeElementRef >, daeTArray< daeDouble >, daeTArray< domTrifansRef >, daeTArray< daeEnum >, daeTArray< domKeywordsRef >, daeTArray< domName_arrayRef >, daeTArray< domLibraryRef >, daeTArray< domSkewRef >, daeTArray< domImageRef >, daeTArray< domCameraRef >, daeTArray< daeLong >, daeTArray< daeAtomicType * >, daeTArray< domGeometryRef >, daeTArray< daeMetaAttributeRef >, daeTArray< domInstanceRef >, daeTArray< domMatrixRef >, daeTArray< domLinesRef >, daeTArray< domUnitRef >, daeTArray< domModifiedRef >, daeTArray< domInt_arrayRef >, daeTArray< domMaterialRef >, daeTArray< domVRef >, and daeTArray< daeStringRef >.

size_t daeArray::getCapacity  )  const [inline]
 

Gets the current capacity of the array, the biggest it can get without incurring a realloc.

Returns:
Returns the capacity of the array.

size_t daeArray::getCount  )  const [inline]
 

Gets the number of items stored in this daeArray.

Returns:
Returns the number of items stored in this daeArray.

size_t daeArray::getElementSize  )  const [inline]
 

Gets the size of an element in this array.

Returns:
Returns the size of an element in this array.

daeMemoryRef daeArray::getRawData  )  const [inline]
 

Gets a pointer to the memory where the raw data for this daeArray is stored.

Returns:
Returns a pointer to the memory for the raw data.

void daeArray::grow size_t  sz  ) 
 

Increases the size of the daeArray.

Parameters:
sz Size to grow the array to.

daeInt daeArray::removeIndex size_t  index  )  [virtual]
 

Removes an item at a specific index in the daeArray.

Parameters:
index Index number of the item to delete.
Returns:
Returns DAE_OK if success, a negative value defined in daeError.h otherwise.
Note:
The daeElement objects sometimes list objects in two places, the class member and the _contents array, when you remove something from the dom, you must remove it from both places.

Reimplemented in daeTArray< T >, daeTArray< domExtraRef >, daeTArray< domScaleRef >, daeTArray< domShaderRef >, daeTArray< daeMetaElementAttribute * >, daeTArray< domAuthorRef >, daeTArray< daeString >, daeTArray< domBoundingboxRef >, daeTArray< domPRef >, daeTArray< domTrianglesRef >, daeTArray< domSource_dataRef >, daeTArray< domBool_arrayRef >, daeTArray< domPassRef >, daeTArray< domTranslateRef >, daeTArray< daeMetaAttribute * >, daeTArray< domCommentsRef >, daeTArray< domSubjectRef >, daeTArray< domArrayRef >, daeTArray< domTechniqueRef >, daeTArray< domPerspectiveRef >, daeTArray< daeBool >, daeTArray< domParamRef >, daeTArray< domPolygonsRef >, daeTArray< domEntryRef >, daeTArray< domProgramRef >, daeTArray< domLightRef >, daeTArray< domControllerRef >, daeTArray< daeStringRefArray >, daeTArray< domChannelRef >, daeTArray< domAccessorRef >, daeTArray< domAnimationRef >, daeTArray< domNodeRef >, daeTArray< daeURIResolver * >, daeTArray< domUp_axisRef >, daeTArray< domSourceRef >, daeTArray< domRotateRef >, daeTArray< domLookatRef >, daeTArray< domLinestripsRef >, daeTArray< domCodeRef >, daeTArray< domSamplerRef >, daeTArray< domRevisionRef >, daeTArray< domHRef >, daeTArray< domCopyrightRef >, daeTArray< daeChar >, daeTArray< daeMetaElementAttributeRef >, daeTArray< daeIDRefResolver * >, daeTArray< domInputRef >, daeTArray< daeMetaElementRef >, daeTArray< domCreatedRef >, daeTArray< domFloat_arrayRef >, daeTArray< domTextureRef >, daeTArray< domTristripsRef >, daeTArray< domTitleRef >, daeTArray< domAuthoring_toolRef >, daeTArray< daeElementRef >, daeTArray< daeDouble >, daeTArray< domTrifansRef >, daeTArray< daeEnum >, daeTArray< domKeywordsRef >, daeTArray< domName_arrayRef >, daeTArray< domLibraryRef >, daeTArray< domSkewRef >, daeTArray< domImageRef >, daeTArray< domCameraRef >, daeTArray< daeLong >, daeTArray< daeAtomicType * >, daeTArray< domGeometryRef >, daeTArray< daeMetaAttributeRef >, daeTArray< domInstanceRef >, daeTArray< domMatrixRef >, daeTArray< domLinesRef >, daeTArray< domUnitRef >, daeTArray< domModifiedRef >, daeTArray< domInt_arrayRef >, daeTArray< domMaterialRef >, daeTArray< domVRef >, and daeTArray< daeStringRef >.

void daeArray::setElementSize size_t  elementSize  )  [inline]
 

Sets the size of an element in the array when creating a daeArray of a specific type.

Parameters:
elementSize Size of an element in the array.

void daeArray::setRawCount size_t  cnt  )  [inline]
 

Grows the array to the specified size and sets the daeArray to that size.

Parameters:
cnt Size to grow the array to.


The documentation for this class was generated from the following files:
  • C:/SVN_wf/COLLADA_DOM/include/dae/daeArray.h
  • C:/SVN_wf/COLLADA_DOM/src/dae/daeArray.cpp

©2005 Sony Computer Entertainment Inc.. All Rights Reserved.
Generated on Fri Feb 10 16:46:45 2006 for COLLADA 1.4 DOM by doxygen 1.4.3