XReflectionLayers Class Reference

#include <private_reflectionlayers.h>

Inheritance diagram for XReflectionLayers:

Public Member Functions

 XReflectionLayers ()
 
virtual XReflectionLayerAllocObject () const
 
virtual XReflectionLayerAllocObjectType (Int32 nType) const
 
virtual void FreeObject (XReflectionLayer *&pObj) const
 
XReflectionLayerAdd (BaseContainer *pData, Int32 layerID, Int32 layerDataID, Bool bAppend, Int32 insertionIndex=0)
 
void Remove (Material *pParent, BaseContainer *pData, XReflectionLayer *pLayer, Bool bAddUndo)
 
virtual void Free ()
 
XReflectionLayerGetLayer (Int32 nIndex)
 
const XReflectionLayerGetLayer (Int32 nIndex) const
 
Int32 GetLayerIndex (const XReflectionLayer &layer) const
 
Bool ReadElementCreate (HyperFile *pFile, XReflectionLayer *&pLayer, Int32 nLevel)
 
Bool WriteElementHF (HyperFile *pFile, const XReflectionLayer *pElement) const
 
Int32 Compare (XReflectionLayers *pLayers)
 
virtual Bool CopyTo (CDynamicObjectArray< XReflectionLayer > *pDest, AliasTrans *pTrans, Bool bAppend=false) const
 
XReflectionLayerFindLayerDataID (Int32 id)
 
Bool CompareStructure (XReflectionLayers &pLayers)
 
- Public Member Functions inherited from CDynamicObjectArray< XReflectionLayer >
 CDynamicObjectArray ()
 
virtual ~CDynamicObjectArray ()
 
XReflectionLayerGetNextObject ()
 
XReflectionLayerInsertAt (Int32 l)
 
XReflectionLayerGetNextObjectType (Int32 lID)
 
XReflectionLayerInsertAtType (Int32 lID, Int32 l)
 
Int32 GetObjectIndex (const XReflectionLayer *pObj) const
 
XReflectionLayerGetObjectAt (Int32 l) const
 
Int32 GetElementCount () const
 
Bool RemoveAt (Int32 l)
 
Bool RemoveObjectPointer (const XReflectionLayer *pObj)
 
const CDynArray< ArrayElementPtr > * GetArray () const
 
CDynArray< ArrayElementPtr > * GetArray ()
 
XReflectionLayeroperator[] (Int32 l) const
 
Bool IsEmpty () const
 
Bool IsEqual (const CDynamicObjectArray< XReflectionLayer > *pArray) const
 
Bool RemovePointer (Int32 lIndex)
 
Bool InsertObject (XReflectionLayer *pObj, Int32 lIndex)
 
Bool Init (const XReflectionLayer *const *ppObjects, Int32 lCount, AliasTrans *pTrans=nullptr, Bool bAppend=false)
 
Bool Alloc (Int32 lElementCount)
 
Bool Read (HyperFile *pFile, Bool bFlush=true)
 
Bool Write (HyperFile *pFile, Int32 lLevel) const
 
Bool ReadCreateObject (HyperFile *pFile, Bool bFlush=true)
 

Public Attributes

BaseList2D_material
 
Int32 _lastLayerIndexHit
 

Additional Inherited Members

- Public Types inherited from CDynamicObjectArray< XReflectionLayer >
typedef XReflectionLayerArrayElementPtr
 
- Protected Member Functions inherited from CDynamicObjectArray< XReflectionLayer >
virtual XReflectionLayerAllocObject () const=0
 
virtual XReflectionLayerGetClone (const XReflectionLayer *pObj, AliasTrans *pTrans) const
 
virtual Bool ReadElement (BaseFile *pFile, XReflectionLayer *pElement, Int32 lLevel)
 
virtual Bool WriteElement (BaseFile *pFile, const XReflectionLayer *pElement) const
 
virtual Bool ReadElementHF (HyperFile *pFile, XReflectionLayer *pElement, Int32 lLevel)
 
virtual Bool TestEqual (const XReflectionLayer *pObjA, const XReflectionLayer *pObjB) const
 
- Protected Attributes inherited from CDynamicObjectArray< XReflectionLayer >
CDynArray< ArrayElementPtrm_Objects
 

Detailed Description

Internal.

Constructor & Destructor Documentation

◆ XReflectionLayers()

Default constructor.

Member Function Documentation

◆ AllocObject()

virtual XReflectionLayer* AllocObject ( ) const
virtual

Inherited.

◆ AllocObjectType()

virtual XReflectionLayer* AllocObjectType ( Int32  nType) const
virtual

Inherited.

Reimplemented from CDynamicObjectArray< XReflectionLayer >.

◆ FreeObject()

virtual void FreeObject ( XReflectionLayer *&  pObj) const
virtual

◆ Add()

XReflectionLayer* Add ( BaseContainer pData,
Int32  layerID,
Int32  layerDataID,
Bool  bAppend,
Int32  insertionIndex = 0 
)

Adds a new reflection layer to the list.

Parameters
[in]pDataLayer's material data.
[in]layerIDThe layer ID.
See also
iXRLayersDataType::GetLayerID()
Parameters
[in]layerDataIDThe layer data ID.
See also
iXRLayersDataType::GetNextDataID().
Parameters
[in]bAppendTrue: append, false: add to the head.
Returns
The new layer.

◆ Remove()

void Remove ( Material pParent,
BaseContainer pData,
XReflectionLayer pLayer,
Bool  bAddUndo 
)

Removes a layer from the list.

Parameters
[out]pParentReflection layer owner.
[out]pDataReflection layer data container (normally is the pParent material data container).
[out]pLayerThe layer to remove. Must be in the list.
[in]bAddUndoSet to true to add to undo stack the action, set to false to ignore undo.

◆ Free()

virtual void Free ( )
virtual

Inherited.

Reimplemented from CDynamicObjectArray< XReflectionLayer >.

◆ GetLayer() [1/2]

XReflectionLayer* GetLayer ( Int32  nIndex)

Gets the layer at index nIndex.

Parameters
[in]nIndexThe layer index in range [0, GetElementCount() - 1].
Returns
The requested layer or nullptr if index is out of range.

◆ GetLayer() [2/2]

const XReflectionLayer* GetLayer ( Int32  nIndex) const

Gets the layer at index nIndex. (Read-only version).

Parameters
[in]nIndexThe layer index in range [0, GetElementCount() - 1].
Returns
The requested layer or nullptr if index is out of range.

◆ GetLayerIndex()

Int32 GetLayerIndex ( const XReflectionLayer layer) const

◆ ReadElementCreate()

Bool ReadElementCreate ( HyperFile pFile,
XReflectionLayer *&  pLayer,
Int32  nLevel 
)
virtual

Inherited.

Reimplemented from CDynamicObjectArray< XReflectionLayer >.

◆ WriteElementHF()

Bool WriteElementHF ( HyperFile pFile,
const XReflectionLayer pElement 
) const
virtual

Inherited.

Reimplemented from CDynamicObjectArray< XReflectionLayer >.

◆ Compare()

Int32 Compare ( XReflectionLayers pLayers)

Compares pLayers reflection layer list with this list.

Parameters
[in]pLayersThe reflection layer list to compare.
Returns
0 if equal, otherwise 1.

◆ CopyTo()

virtual Bool CopyTo ( CDynamicObjectArray< XReflectionLayer > *  pDest,
AliasTrans pTrans,
Bool  bAppend = false 
) const
virtual

Inherited.

Reimplemented from CDynamicObjectArray< XReflectionLayer >.

◆ FindLayerDataID()

XReflectionLayer* FindLayerDataID ( Int32  id)

◆ CompareStructure()

Bool CompareStructure ( XReflectionLayers pLayers)

Compares two lists structurally (item count and layer names).

Parameters
[in]pLayersReflection layer list to compare.
Returns
True if both are equal, otherwise false.

Member Data Documentation

◆ _material

BaseList2D* _material

◆ _lastLayerIndexHit

Int32 _lastLayerIndexHit