LayerSet Class Reference

#include <customgui_layerset.h>

Inheritance diagram for LayerSet:

Detailed Description

Layer set custom data type (CUSTOMDATATYPE_LAYERSET).

Public Member Functions

Bool IsPopulated () const
 
Bool IsLayerEnabled (const maxon::String &name) const
 
Bool FindLayerSet (const maxon::String &name) const
 
String GetName () const
 
LAYERSETMODE GetMode () const
 
void SetMode (LAYERSETMODE t_mode)
 
void RemoveLayer (const maxon::String &layer)
 
void AddLayer (const maxon::String &layer)
 
void FlushLayers ()
 
void SetPreviewMode (Int32 s)
 
Int32 GetPreviewMode (void)
 
const LayerSetoperator= (const LayerSet &layerset)
 
Bool operator== (const LayerSet &layerset) const
 
void CopyTo (LayerSet &dst) const
 

Private Member Functions

 LayerSet ()
 
 ~LayerSet ()
 

Alloc/Free

static LayerSetAlloc ()
 
static void Free (LayerSet *layerset)
 

Constructor & Destructor Documentation

◆ LayerSet()

LayerSet ( )
private

◆ ~LayerSet()

~LayerSet ( )
private

Member Function Documentation

◆ IsPopulated()

Bool IsPopulated ( ) const

Checks if the layer set has content.

Returns
true if the set contains any layer, otherwise false.

◆ IsLayerEnabled()

Bool IsLayerEnabled ( const maxon::String name) const

Checks if a layer is enabled.

Parameters
[in]nameThe name of the layer to check for.
Returns
true if the layer is enabled, otherwise false.

◆ FindLayerSet()

Bool FindLayerSet ( const maxon::String name) const

Checks if a layer is in the set.

Parameters
[in]nameThe name of the layer to check for.
Returns
true if the layer is in the set, otherwise false.

◆ GetName()

String GetName ( ) const

Gets the set's name.

Returns
The name of the set.

◆ GetMode()

LAYERSETMODE GetMode ( void  ) const

Gets the layer set mode.

Returns
The mode: LAYERSETMODE

◆ SetMode()

void SetMode ( LAYERSETMODE  t_mode)

Sets a new layer set mode.

Parameters
[in]t_modeThe mode to set: LAYERSETMODE

◆ RemoveLayer()

void RemoveLayer ( const maxon::String layer)

Removes a layer.

Parameters
[in]layerThe name of the layer to remove.

◆ AddLayer()

void AddLayer ( const maxon::String layer)

Adds a layer.

Parameters
[in]layerThe name of the layer to add.

◆ FlushLayers()

void FlushLayers ( )

Flushes all layers.

◆ SetPreviewMode()

void SetPreviewMode ( Int32  s)

Sets the preview mode.

Parameters
[in]sThe preview mode to set.

◆ GetPreviewMode()

Int32 GetPreviewMode ( void  )

Gets the preview mode.

Returns
The current preview mode.

◆ operator=()

const LayerSet& operator= ( const LayerSet layerset)

Assignment operator. Copies the source layerset.

Parameters
[in]layersetThe source layer set.
Returns
The assigned layer set to the left-operand.

◆ operator==()

Bool operator== ( const LayerSet layerset) const

Equality operator. Checks if the set and layerset are equal.

Parameters
[in]layersetThe layer set to compare with.
Returns
true if the layer sets are equal, otherwise false.

◆ CopyTo()

void CopyTo ( LayerSet dst) const

Copies the layer set to dst.

Parameters
[in]dstThe destination layer set.

◆ Alloc()

static LayerSet* Alloc ( void  )
static

Allocates a layer set data. Destroy the allocated layer set data with Free(). Use AutoAlloc to automate the allocation and destruction based on scope.

Returns
The allocated layer set data, or nullptr if the allocation failed.

◆ Free()

static void Free ( LayerSet layerset)
static

Destructs layer set datas allocated with Alloc(). Use AutoAlloc to automate the allocation and destruction based on scope.

Parameters
[in,out]layersetThe layer set data to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards.