#include <DbLayerState.h>
|
static OdDbObjectId | dictionaryId (OdDbDatabase *pDb, bool createIfNotFound=false) |
|
static bool | has (OdDbDatabase *pDb, const OdString &layerStateName) |
|
static void | save (OdDbDatabase *pDb, const OdString &layerStateName, int layerStateMask, const OdDbObjectId &viewportId=OdDbObjectId::kNull) |
|
static void | restore (OdDbDatabase *pDb, const OdString &layerStateName, int flags=OdDbLayerStateManager::kUndefDoNothing, const int layerStateMask=-1, const OdDbObjectId &viewportId=OdDbObjectId::kNull) |
|
static void | setMask (OdDbDatabase *pDb, const OdString &layerStateName, int layerStateMask) |
|
static int | mask (OdDbDatabase *pDb, const OdString &layerStateName) |
|
static void | remove (OdDbDatabase *pDb, const OdString &layerStateName) |
|
static void | rename (OdDbDatabase *pDb, const OdString &oldName, const OdString &newName) |
|
static ImportResult | importData (OdDbDatabase *pDb, OdStreamBuf *pStreamBuf, OdString *pName=0) |
|
static void | exportData (OdDbDatabase *pDb, const OdString &layerStateName, OdStreamBuf *pStreamBuf) |
|
static void | setDescription (OdDbDatabase *pDb, const OdString &layerStateName, const OdString &description) |
|
static OdString | description (OdDbDatabase *pDb, const OdString &layerStateName) |
|
static bool | hasViewportData (OdDbDatabase *pDb, const OdString &layerStateName) |
|
static OdResult | addLayerStateLayers (const OdString &sName, OdDbObjectIdArray layerIds) |
|
static OdResult | removeLayerStateLayers (OdDbDatabase *pDb, const OdString sName, const OdStringArray &layerNames) |
|
static OdResult | saveGroup (OdDbDatabase *pDb, const OdString &sName, const OdDbObjectIdArray &pLayers, int mask=OdDbLayerStateManager::kOn, int includedLayersState=OdDbLayerStateManager::kOn, int otherLayersState=OdDbLayerStateManager::kNone) |
|
This class implements an interface for manipulating LayerStates in multiple OdDbDatabase instances.
Corresponding C++ library: TD_Db <group OdDb_Classes>
Definition at line 564 of file DbLayerState.h.
◆ ImportResult
This enumeration specifies the results of the import operations for layer states.
Enumerator |
---|
kImported | |
kAlreadyExists | |
Definition at line 763 of file DbLayerState.h.
◆ addLayerStateLayers()
Adds more layers to a layer state.
- Parameters
-
pDb | [in] Pointer to the database. |
layerStateName | [in] LayerState name. |
layerIds | [in] Array of object Ids of layers to be added to the layer state |
- Returns
- eOk if operation succeeded; error code otherwise.
◆ description()
Returns the description of the specified LayerState in the specified database.
- Parameters
-
pDb | [in] Pointer to the database. |
layerStateName | [in] LayerState name. |
- Returns
- Description of the LayerState.
◆ dictionaryId()
Returns the Object ID of the LayerStates dictionary for the specified database.
- Parameters
-
pDb | [in] Pointer to the database. |
createIfNotFound | [in] Controls the creation of the dictionary if it does not exist. |
- Returns
- Object ID of the LayerStates dictionary.
◆ exportData()
Exports the LayerState from the specified database to the specified file.
- Parameters
-
pDb | [in] Pointer to the database. |
pStreamBuf | [in] Pointer to the StreamBuf object to which the data are to be written. |
layerStateName | [in] LayerState name. |
◆ has()
Returns true if and only if the specified database has a LayerState with the specified name.
- Parameters
-
pDb | [in] Pointer to the database. |
layerStateName | [in] LayerState name. |
- Returns
- True if the specified database has a LayerState with the specified name; false otherwise.
◆ hasViewportData()
Returns true if and only if there is viewport data associated with specified LayerState in the specified database.
- Parameters
-
pDb | [in] Pointer to the database. |
layerStateName | [in] LayerState name. |
- Returns
- True if there is viewport data associated with specified LayerState; false otherwise.
◆ importData()
Imports the LayerState from the specified file to the specified database.
- Parameters
-
pDb | [in] Pointer to the database. |
pStreamBuf | [in] Pointer to the StreamBuf object from which the data are to be read. |
pName | [out] Optional pointer to the string where imported layer state name will be stored. |
- Returns
- Import result. Can be one of the following:
Value kImported 0 kAlreadyExists 1
◆ mask()
Returns the LayerState mask for the specified LayerState in the specified database.
- Parameters
-
pDb | [in] Pointer to the database. |
layerStateName | [in] LayerState name. |
- Returns
- LayerState mask.
mask() returns a combination of one or more of the following:
Value kNone 0x0000 kOn 0x0001 kFrozen 0x0002 kLocked 0x0004 kPlot 0x0008 kNewViewport 0x0010 kColor 0x0020 kLineType 0x0040 kLineWeight 0x0080 kPlotStyle 0x0100 kCurrentViewport 0x0200 kTransparency 0x0400 kAll kOn | kFrozen | kLocked | kPlot | kNewViewport | kColor | kLineType | kLineWeight | kPlotStyle | kCurrentViewport | kTransparency kHidden 0x8000
◆ remove()
Removes the specified LayerState from the specified database.
- Parameters
-
pDb | [in] Pointer to the database. |
layerStateName | [in] LayerState name. |
◆ removeLayerStateLayers()
Removes layers from a layer state.
- Parameters
-
pDb | [in] Pointer to the database. |
layerStateName | [in] LayerState name. |
layerNames | [in] Array of names of layers to be removed from the layer state. |
- Returns
- eOk if operation succeeded; error code otherwise.
◆ rename()
Renames the specified LayerState in the specified database.
- Parameters
-
pDb | [in] Pointer to the database. |
oldName | [in] Old name. |
newName | [in] New name. |
◆ restore()
Restores the specified LayerState of the specified database.
- Parameters
-
pDb | [in] Pointer to the database. |
layerStateName | [in] LayerState name. |
layerStateMask | [in] LayerState mask. |
viewportId | [in] Viewport whose LayerState is to be saved. |
undefAction | [in] Action for undefined layers. |
Value kUndefDoNothing 0 kUndefTurnOff 1 kUndefFreeze 2
layerStateMask determines which layer attributes are to be restored from the LayerState. layerStateMask must be a combination of one or more of the following:
Value kDefMask 0xFFFFFFFF kNone 0x0000 kOn 0x0001 kFrozen 0x0002 kLocked 0x0004 kPlot 0x0008 kNewViewport 0x0010 kColor 0x0020 kLineType 0x0040 kLineWeight 0x0080 kPlotStyle 0x0100 kCurrentViewport 0x0200 kTransparency 0x0400 kAll kOn | kFrozen | kLocked | kPlot | kNewViewport | kColor | kLineType | kLineWeight | kPlotStyle | kCurrentViewport | kTransparency kHidden 0x8000
◆ save()
Saves the current LayerState of the specified database.
- Parameters
-
pDb | [in] Pointer to the database. |
layerStateName | [in] LayerState name. |
layerStateMask | [in] LayerState mask. |
viewportId | [in] Viewport whose LayerState is to be saved. |
Value kNone 0x0000 kOn 0x0001 kFrozen 0x0002 kLocked 0x0004 kPlot 0x0008 kNewViewport 0x0010 kColor 0x0020 kLineType 0x0040 kLineWeight 0x0080 kPlotStyle 0x0100 kCurrentViewport 0x0200 kTransparency 0x0400 kAll kOn | kFrozen | kLocked | kPlot | kNewViewport | kColor | kLineType | kLineWeight | kPlotStyle | kCurrentViewport | kTransparency kHidden 0x8000
◆ saveGroup()
Creates a layer state where specified layers are assigned one state (e.g. ON), and all the others are assigned other state (e.g. OFF).
- Parameters
-
pDb | [in] Pointer to the database. |
layerStateName | [in] LayerState name. |
layerIds | [in] Array of object Ids of layers to be added to the layer state |
mask | [in] created |
- Returns
- eOk if operation succeeded; error code otherwise.
◆ setDescription()
Sets the description of the specified LayerState in the specified database.
- Parameters
-
pDb | [in] Pointer to the database. |
layerStateName | [in] LayerState name. |
description | [in] Description. |
◆ setMask()
Sets the LayerState mask for the specified LayerState in the specified database.
- Parameters
-
pDb | [in] Pointer to the database. |
layerStateName | [in] LayerState name. |
layerStateMask | [in] LayerState mask. |
Value kNone 0x0000 kOn 0x0001 kFrozen 0x0002 kLocked 0x0004 kPlot 0x0008 kNewViewport 0x0010 kColor 0x0020 kLineType 0x0040 kLineWeight 0x0080 kPlotStyle 0x0100 kCurrentViewport 0x0200 kTransparency 0x0400 kAll kOn | kFrozen | kLocked | kPlot | kNewViewport | kColor | kLineType | kLineWeight | kPlotStyle | kCurrentViewport | kTransparency kHidden 0x8000
The documentation for this class was generated from the following file: