MatAssignData Class Reference

#include <customgui_matassign.h>

Inheritance diagram for MatAssignData:

Detailed Description

Material assignment custom data type (CUSTOMDATATYPE_MATASSIGN).

Private Member Functions

 MatAssignData ()
 
 ~MatAssignData ()
 

Material

void SetMaterial (const AtomArray &materials)
 
Bool GetMaterial (BaseDocument *doc, AtomArray &materials)
 

Object

Bool InsertObject (BaseList2D *pObject, Int32 lFlags)
 
Bool DeleteObject (BaseDocument *doc, BaseList2D *pObject)
 
Bool DeleteObject (Int32 lIndex)
 
Int32 GetObjectIndex (BaseDocument *doc, BaseList2D *pObject)
 
BaseList2DObjectFromIndex (BaseDocument *doc, Int32 lIndex)
 
Int32 GetObjectCount ()
 

Flags

Int32 GetFlags (Int32 lIndex)
 
Int32 GetFlags (BaseDocument *doc, BaseList2D *pObject)
 

Data

BaseContainerGetData (Int32 lIndex)
 
BaseContainerGetData (BaseDocument *doc, BaseList2D *pObject)
 

Inclusion Table

MatAssignTableBuildInclusionTable (BaseDocument *doc, Int32 hierarchy_bit=NOTOK)
 

Constructor & Destructor Documentation

◆ MatAssignData()

MatAssignData ( )
private

◆ ~MatAssignData()

~MatAssignData ( )
private

Member Function Documentation

◆ SetMaterial()

void SetMaterial ( const AtomArray materials)

Sets the materials.

Parameters
[in]materialsThe materials.

◆ GetMaterial()

Bool GetMaterial ( BaseDocument doc,
AtomArray materials 
)

Retrieves the materials.

Parameters
[in]docThe document for the materials. The caller owns the pointed document.
[out]materialsFilled with the materials.
Returns
true if successful, otherwise false.

◆ InsertObject()

Bool InsertObject ( BaseList2D pObject,
Int32  lFlags 
)

Inserts an object into the list.

Parameters
[in]pObjectThe object to insert. The caller owns the pointed object.
[in]lFlagsA bit field for the initial selection state of pObject.
Returns
true if successful, otherwise false.

◆ DeleteObject() [1/2]

Bool DeleteObject ( BaseDocument doc,
BaseList2D pObject 
)

Deletes an object from the list.

Parameters
[in]docThe document for pObject. The caller owns the pointed document.
[in]pObjectThe object to delete. The caller owns the pointed object.
Returns
true if successful, otherwise false.

◆ DeleteObject() [2/2]

Bool DeleteObject ( Int32  lIndex)

Deletes an object by index.

Parameters
[in]lIndexThe object index: 0 <= lIndex < GetObjectCount()
Returns
true if successful, otherwise false.

◆ GetObjectIndex()

Int32 GetObjectIndex ( BaseDocument doc,
BaseList2D pObject 
)

Gets an object's index in the list.

Parameters
[in]docThe document for pObject. The caller owns the pointed document.
[in]pObjectThe object to get the index for. The caller owns the pointed object.
Returns
The object index, or NOTOK if it is not found.

◆ ObjectFromIndex()

BaseList2D* ObjectFromIndex ( BaseDocument doc,
Int32  lIndex 
)

Gets an object by index.

Parameters
[in]docThe document for the object. The caller owns the pointed document.
[in]lIndexThe object index: 0 <= lIndex < GetObjectCount()
Returns
The object, as inserted with InsertObject().

◆ GetObjectCount()

Int32 GetObjectCount ( )

Gets the object count.

Returns
The number of objects in the list.

◆ GetFlags() [1/2]

Int32 GetFlags ( Int32  lIndex)

Gets the flags of an object by index.

Parameters
[in]lIndexThe object index: 0 <= lIndex < GetObjectCount()
Returns
A bit field for the selection state of the object at lIndex in the list.

◆ GetFlags() [2/2]

Int32 GetFlags ( BaseDocument doc,
BaseList2D pObject 
)

Gets the flags of an object.

Parameters
[in]docThe document for pObject. The caller owns the pointed document.
[in]pObjectThe object to get the flags for. The caller owns the pointed object.
Returns
A bit field for the initial selection state of pObject.

◆ GetData() [1/2]

BaseContainer* GetData ( Int32  lIndex)

Retrieves the data for an object by index.

Parameters
[in]lIndexThe object index: 0 <= lIndex < GetObjectCount()
Returns
The data.

◆ GetData() [2/2]

BaseContainer* GetData ( BaseDocument doc,
BaseList2D pObject 
)

Gets the data for an object.

Parameters
[in]docThe document for pObject. The caller owns the pointed document.
[in]pObjectThe object to get the data for. The caller owns the pointed object.
Returns
The data.

◆ BuildInclusionTable()

MatAssignTable* BuildInclusionTable ( BaseDocument doc,
Int32  hierarchy_bit = NOTOK 
)

Builds a material inclusion table containing all included objects.

Parameters
[in]docThe document. The caller owns the pointed document.
[in]hierarchy_bitThe hierarchy bit. Starts at 0.
Returns
The inclusion table. Delete the list by calling (table).