This class represents a set of layer information, such as their name and identifier, as well as a list of layer filters.
.
More...
Public Member Functions | |
Dtk_LayerFilterInfosPtr | CreateLayerFilterInfos (Dtk_string inName=L"", Dtk_string inDescription=L"", const Dtk_bool inAreLayersSelectedByDefault=DTK_FALSE, const Dtk_bool IsDefaultLayerFilter=DTK_FALSE) |
Create a layer filter. More... | |
Dtk_Int32 | DtkDynamicType (const Dtk_Int32 &inId) |
Retrieves the dynamic entity type. More... | |
virtual int | DtkDynamicType (const int &inId)=0 |
virtual void | dump (FILE *file=stdout) |
type_detk | get_type_detk () const |
Dtk_ErrorStatus | GetDefaultLayer (Dtk_Size_t &outDefaultLayerIndex) const |
Gets the default layer index. More... | |
Dtk_ErrorStatus | GetDefaultLayerFilter (Dtk_Size_t &outDefaultLayerFilterIndex) const |
Gets the default layer filter index. More... | |
Dtk_LayerFilterInfosPtr | GetLayerFilterByPos (const Dtk_Size_t inLayerFilterIndex) const |
Gets a layer filter giving its index. More... | |
Dtk_ErrorStatus | GetLayerID (const Dtk_Size_t inLayerIndex, Dtk_ID &outLayerID) const |
Gets the LayerID giving its index. More... | |
Dtk_ErrorStatus | GetLayerName (const Dtk_Size_t inIndex, Dtk_string &outLayerName) const |
Gets the LayerName giving its index. More... | |
Dtk_ErrorStatus | GetLayerNameById (const Dtk_ID inLayerID, Dtk_string &outLayerName) const |
Gets the LayerName giving the ID found by infos->GetLayer(). More... | |
Dtk_Size_t | GetNumLayerFilters () const |
Retrieves the number of layer filters. More... | |
Dtk_Size_t | GetNumLayers () const |
Retrieves the number of layers. More... | |
virtual Dtk_Size_t | GetSize () const |
Dtk_ErrorStatus | SetDefaultLayer (const Dtk_Size_t inDefaultLayerIndex) |
Sets the default layer index. More... | |
Dtk_ErrorStatus | SetLayerID (const Dtk_Size_t inLayerIndex, const Dtk_ID &inLayerID) |
Sets the LayerID giving its index. More... | |
Dtk_ErrorStatus | SetLayerName (const Dtk_Size_t inIndex, const Dtk_string &inLayerName) |
Sets the layer name giving its index. More... | |
Static Public Member Functions | |
static Dtk_LayerInfosSetPtr | Create (const Dtk_Size_t inNumLayers) |
Calls a constructor to allocate a new object. More... | |
static Dtk_LayerInfosSet * | DtkDynamicCast (Dtk_Object *s) |
Performs a dynamic cast - doesn't need RTTI -. More... | |
Protected Types | |
enum | { _typeID = DTK_TYPE_OBJECT } |
enum | { _typeID = DTK_TYPE_LAYER_INFOS_SET } |
Protected Member Functions | |
virtual Dtk_Object * | Clone () |
Dtk_LayerInfosSet (const Dtk_LayerInfosSet &s) | |
Dtk_LayerInfosSet (const Dtk_Size_t inNumLayers) | |
~Dtk_LayerInfosSet () | |
Destructor. More... | |
Protected Attributes | |
Dtk_Handle * | _Private |
unsigned long | count_ |
This class represents a set of layer information, such as their name and identifier, as well as a list of layer filters.
.
The set allows to extend the definition of legacy layers, that previously were only represented by an identifier. It lists all layers used in a given context (Dtk_Component), and allows to assign a name to each of them.
It also allows to define one of the layer as being the default one (note that this can be the same concept as the current one, depending on the format).
Creation of layer filters are also done through this set, representing a group of specific layers.
One of the filter can be defined as being the default one, similarly to individual layer.
|
protected |
|
protected |
|
protected |
Destructor.
|
protectedvirtual |
|
static |
Calls a constructor to allocate a new object.
inNumLayers | the number of desired layers. |
Dtk_LayerFilterInfosPtr Dtk_LayerInfosSet::CreateLayerFilterInfos | ( | Dtk_string | inName = L"" , |
Dtk_string | inDescription = L"" , |
||
const Dtk_bool | inAreLayersSelectedByDefault = DTK_FALSE , |
||
const Dtk_bool | IsDefaultLayerFilter = DTK_FALSE |
||
) |
Create a layer filter.
inName | the layer filter name - Empty name by default -. |
inAreLayersActivatedByDefault | The default value of the layer selection. DTK_TRUE means that all layers are selected. DTK_FALSE means that no layer is selected - DTK_FALSE by default -. |
IsDefaultLayerFilter | Tells if the new layer filter is the default one - DTK_FALSE by default -. |
|
static |
Performs a dynamic cast - doesn't need RTTI -.
Retrieves the dynamic entity type.
|
pure virtualinherited |
Implemented in Dtk_Shell, Dtk_Body, Dtk_Lump, Dtk_Volume, Dtk_Face, Dtk_Loop, Dtk_Coedge, Dtk_Edge, Dtk_Vertex, Dtk_TopologicalEntity, Dtk_MeshPolyline, Dtk_MeshSurface, Dtk_TransformedSurface, Dtk_FilletSurface, Dtk_OffsetSurface, Dtk_SphericalSurface, Dtk_ToroidalSurface, Dtk_ConicalSurface, Dtk_CylindricalSurface, Dtk_RuledSurface, Dtk_LinearExtrusionSurface, Dtk_StandardRevolutionSurface, Dtk_RevolutionSurface, Dtk_PlaneSurface, Dtk_NurbsSurface, Dtk_Surface, Dtk_Hyperbola, Dtk_Parabola, Dtk_Ellipse, Dtk_Conic, Dtk_Line, Dtk_Polyline, Dtk_NurbsCurve, Dtk_Curve, Dtk_Point, Dtk_Constraint, Dtk_ConstraintReference, Dtk_AxisSystem, Dtk_Preview, Dtk_Entity, Dtk_picture, Dtk_OverrideSet, Dtk_OverrideInfo, Dtk_MainDoc, Dtk_Component, Dtk_Node, Dtk_DocElement, Dtk_Log, and Dtk_Properties.
|
virtualinherited |
type_detk Dtk_LayerInfosSet::get_type_detk | ( | ) | const |
Dtk_ErrorStatus Dtk_LayerInfosSet::GetDefaultLayer | ( | Dtk_Size_t & | outDefaultLayerIndex | ) | const |
Gets the default layer index.
outDefaultLayer | the layer index or -1 if any error. |
Dtk_ErrorStatus Dtk_LayerInfosSet::GetDefaultLayerFilter | ( | Dtk_Size_t & | outDefaultLayerFilterIndex | ) | const |
Gets the default layer filter index.
outDefaultLayerFilter | the layer filter index or -1 if any error. |
Dtk_LayerFilterInfosPtr Dtk_LayerInfosSet::GetLayerFilterByPos | ( | const Dtk_Size_t | inLayerFilterIndex | ) | const |
Gets a layer filter giving its index.
inLayerFilterPos | the layer filter index. |
Dtk_ErrorStatus Dtk_LayerInfosSet::GetLayerID | ( | const Dtk_Size_t | inLayerIndex, |
Dtk_ID & | outLayerID | ||
) | const |
Gets the LayerID giving its index.
inLayerPos | the layer index. |
outLayerID | the layer id or inLayerPos if not given. |
Dtk_ErrorStatus Dtk_LayerInfosSet::GetLayerName | ( | const Dtk_Size_t | inIndex, |
Dtk_string & | outLayerName | ||
) | const |
Gets the LayerName giving its index.
inLayerPos | the layer index. |
outLayerName | the layer name or empty string if any error. |
Dtk_ErrorStatus Dtk_LayerInfosSet::GetLayerNameById | ( | const Dtk_ID | inLayerID, |
Dtk_string & | outLayerName | ||
) | const |
Gets the LayerName giving the ID found by infos->GetLayer().
inLayerID | the layer ID. |
outLayerName | the layer name or empty string if any error. |
Dtk_Size_t Dtk_LayerInfosSet::GetNumLayerFilters | ( | ) | const |
Retrieves the number of layer filters.
Dtk_Size_t Dtk_LayerInfosSet::GetNumLayers | ( | ) | const |
Retrieves the number of layers.
|
virtualinherited |
Reimplemented in Dtk_Shell, Dtk_Body, Dtk_Lump, Dtk_Volume, Dtk_Face, Dtk_Loop, Dtk_Coedge, Dtk_Edge, Dtk_Vertex, Dtk_mesh_face, Dtk_mesh, Dtk_TransformedSurface, Dtk_FilletSurface, Dtk_OffsetSurface, Dtk_SphericalSurface, Dtk_ToroidalSurface, Dtk_ConicalSurface, Dtk_CylindricalSurface, Dtk_RuledSurface, Dtk_LinearExtrusionSurface, Dtk_StandardRevolutionSurface, Dtk_RevolutionSurface, Dtk_PlaneSurface, Dtk_NurbsSurface, Dtk_Surface, Dtk_Hyperbola, Dtk_Parabola, Dtk_Ellipse, Dtk_Conic, Dtk_Line, Dtk_Polyline, Dtk_NurbsCurve, Dtk_Curve, Dtk_Point, Dtk_Entity, and Dtk_Info.
Dtk_ErrorStatus Dtk_LayerInfosSet::SetDefaultLayer | ( | const Dtk_Size_t | inDefaultLayerIndex | ) |
Sets the default layer index.
inDefaultLayer | the layer index. |
Dtk_ErrorStatus Dtk_LayerInfosSet::SetLayerID | ( | const Dtk_Size_t | inLayerIndex, |
const Dtk_ID & | inLayerID | ||
) |
Sets the LayerID giving its index.
inLayerPos | the layer index. |
inLayerID | the layer id. |
Dtk_ErrorStatus Dtk_LayerInfosSet::SetLayerName | ( | const Dtk_Size_t | inIndex, |
const Dtk_string & | inLayerName | ||
) |
Sets the layer name giving its index.
inIndex | the layer index. |
inLayerName | the layer name. |
|
protected |
|
protectedinherited |