File indexing completed on 2025-01-18 10:05:34
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _XCAFDoc_LayerTool_HeaderFile
0017 #define _XCAFDoc_LayerTool_HeaderFile
0018
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021
0022 #include <TDataStd_GenericEmpty.hxx>
0023 #include <TDF_LabelSequence.hxx>
0024 #include <TColStd_HSequenceOfExtendedString.hxx>
0025 class XCAFDoc_ShapeTool;
0026 class TDF_Label;
0027 class Standard_GUID;
0028 class TCollection_ExtendedString;
0029 class TopoDS_Shape;
0030
0031
0032 class XCAFDoc_LayerTool;
0033 DEFINE_STANDARD_HANDLE(XCAFDoc_LayerTool, TDataStd_GenericEmpty)
0034
0035
0036
0037
0038
0039
0040 class XCAFDoc_LayerTool : public TDataStd_GenericEmpty
0041 {
0042
0043 public:
0044
0045
0046 Standard_EXPORT XCAFDoc_LayerTool();
0047
0048
0049 Standard_EXPORT static Handle(XCAFDoc_LayerTool) Set (const TDF_Label& L);
0050
0051 Standard_EXPORT static const Standard_GUID& GetID();
0052
0053
0054 Standard_EXPORT TDF_Label BaseLabel() const;
0055
0056
0057 Standard_EXPORT const Handle(XCAFDoc_ShapeTool)& ShapeTool();
0058
0059
0060
0061 Standard_EXPORT Standard_Boolean IsLayer (const TDF_Label& lab) const;
0062
0063
0064
0065
0066 Standard_EXPORT Standard_Boolean GetLayer (const TDF_Label& lab, TCollection_ExtendedString& aLayer) const;
0067
0068
0069
0070
0071 Standard_EXPORT Standard_Boolean FindLayer (const TCollection_ExtendedString& aLayer, TDF_Label& lab) const;
0072
0073
0074
0075
0076
0077 Standard_EXPORT TDF_Label FindLayer (const TCollection_ExtendedString& aLayer, const Standard_Boolean theToFindWithProperty = Standard_False, const Standard_Boolean theToFindVisible = Standard_True) const;
0078
0079
0080
0081
0082 Standard_EXPORT TDF_Label AddLayer (const TCollection_ExtendedString& theLayer) const;
0083
0084
0085
0086
0087 Standard_EXPORT TDF_Label AddLayer(const TCollection_ExtendedString& theLayer, const Standard_Boolean theToFindVisible) const;
0088
0089
0090 Standard_EXPORT void RemoveLayer (const TDF_Label& lab) const;
0091
0092
0093
0094 Standard_EXPORT void GetLayerLabels (TDF_LabelSequence& Labels) const;
0095
0096
0097
0098
0099
0100 Standard_EXPORT void SetLayer (const TDF_Label& L, const TDF_Label& LayerL, const Standard_Boolean shapeInOneLayer = Standard_False) const;
0101
0102
0103
0104
0105
0106
0107 Standard_EXPORT void SetLayer (const TDF_Label& L, const TCollection_ExtendedString& aLayer, const Standard_Boolean shapeInOneLayer = Standard_False) const;
0108
0109
0110 Standard_EXPORT void UnSetLayers (const TDF_Label& L) const;
0111
0112
0113
0114 Standard_EXPORT Standard_Boolean UnSetOneLayer (const TDF_Label& L, const TCollection_ExtendedString& aLayer) const;
0115
0116
0117
0118 Standard_EXPORT Standard_Boolean UnSetOneLayer (const TDF_Label& L, const TDF_Label& aLayerL) const;
0119
0120
0121
0122 Standard_EXPORT Standard_Boolean IsSet (const TDF_Label& L, const TCollection_ExtendedString& aLayer) const;
0123
0124
0125
0126 Standard_EXPORT Standard_Boolean IsSet (const TDF_Label& L, const TDF_Label& aLayerL) const;
0127
0128
0129 Standard_EXPORT Standard_Boolean GetLayers (const TDF_Label& L, Handle(TColStd_HSequenceOfExtendedString)& aLayerS);
0130
0131
0132 Standard_EXPORT Standard_Boolean GetLayers (const TDF_Label& L, TDF_LabelSequence& aLayerLS);
0133
0134
0135 Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetLayers (const TDF_Label& L);
0136
0137
0138 Standard_EXPORT static void GetShapesOfLayer (const TDF_Label& theLayerL, TDF_LabelSequence& theShLabels);
0139
0140
0141 Standard_EXPORT Standard_Boolean IsVisible (const TDF_Label& layerL) const;
0142
0143
0144
0145 Standard_EXPORT void SetVisibility (const TDF_Label& layerL, const Standard_Boolean isvisible = Standard_True) const;
0146
0147
0148
0149
0150
0151
0152 Standard_EXPORT Standard_Boolean SetLayer (const TopoDS_Shape& Sh, const TDF_Label& LayerL, const Standard_Boolean shapeInOneLayer = Standard_False);
0153
0154
0155
0156
0157
0158
0159 Standard_EXPORT Standard_Boolean SetLayer (const TopoDS_Shape& Sh, const TCollection_ExtendedString& aLayer, const Standard_Boolean shapeInOneLayer = Standard_False);
0160
0161
0162
0163 Standard_EXPORT Standard_Boolean UnSetLayers (const TopoDS_Shape& Sh);
0164
0165
0166
0167 Standard_EXPORT Standard_Boolean UnSetOneLayer (const TopoDS_Shape& Sh, const TCollection_ExtendedString& aLayer);
0168
0169
0170
0171 Standard_EXPORT Standard_Boolean UnSetOneLayer (const TopoDS_Shape& Sh, const TDF_Label& aLayerL);
0172
0173
0174
0175 Standard_EXPORT Standard_Boolean IsSet (const TopoDS_Shape& Sh, const TCollection_ExtendedString& aLayer);
0176
0177
0178
0179 Standard_EXPORT Standard_Boolean IsSet (const TopoDS_Shape& Sh, const TDF_Label& aLayerL);
0180
0181
0182 Standard_EXPORT Standard_Boolean GetLayers (const TopoDS_Shape& Sh, Handle(TColStd_HSequenceOfExtendedString)& aLayerS);
0183
0184
0185 Standard_EXPORT Standard_Boolean GetLayers (const TopoDS_Shape& Sh, TDF_LabelSequence& aLayerLS);
0186
0187
0188 Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetLayers (const TopoDS_Shape& Sh);
0189
0190 Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
0191
0192
0193 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
0194
0195
0196 DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_LayerTool,TDataStd_GenericEmpty)
0197
0198
0199 private:
0200
0201
0202 Handle(XCAFDoc_ShapeTool) myShapeTool;
0203
0204
0205 };
0206
0207
0208
0209
0210
0211
0212
0213 #endif