File indexing completed on 2026-09-14 09:16:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef _TFunction_Scope_HeaderFile
0017 #define _TFunction_Scope_HeaderFile
0018
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021
0022 #include <Standard_Integer.hxx>
0023 #include <TDF_Label.hxx>
0024 #include <NCollection_DoubleMap.hxx>
0025 #include <TFunction_Logbook.hxx>
0026 #include <TDF_Attribute.hxx>
0027 #include <Standard_OStream.hxx>
0028 class TDF_Label;
0029 class Standard_GUID;
0030 class TFunction_Logbook;
0031 class TDF_RelocationTable;
0032
0033
0034 class TFunction_Scope : public TDF_Attribute
0035 {
0036
0037 public:
0038
0039
0040
0041
0042 Standard_EXPORT static occ::handle<TFunction_Scope> Set(const TDF_Label& Access);
0043
0044
0045
0046
0047
0048 Standard_EXPORT static const Standard_GUID& GetID();
0049
0050 Standard_EXPORT TFunction_Scope();
0051
0052
0053 Standard_EXPORT bool AddFunction(const TDF_Label& L);
0054
0055
0056 Standard_EXPORT bool RemoveFunction(const TDF_Label& L);
0057
0058
0059 Standard_EXPORT bool RemoveFunction(const int ID);
0060
0061
0062 Standard_EXPORT void RemoveAllFunctions();
0063
0064
0065 Standard_EXPORT bool HasFunction(const int ID) const;
0066
0067
0068 Standard_EXPORT bool HasFunction(const TDF_Label& L) const;
0069
0070
0071 Standard_EXPORT int GetFunction(const TDF_Label& L) const;
0072
0073
0074 Standard_EXPORT const TDF_Label& GetFunction(const int ID) const;
0075
0076
0077
0078
0079 Standard_EXPORT occ::handle<TFunction_Logbook> GetLogbook() const;
0080
0081 Standard_EXPORT const Standard_GUID& ID() const override;
0082
0083 Standard_EXPORT void Restore(const occ::handle<TDF_Attribute>& with) override;
0084
0085 Standard_EXPORT void Paste(const occ::handle<TDF_Attribute>& into,
0086 const occ::handle<TDF_RelocationTable>& RT) const override;
0087
0088 Standard_EXPORT occ::handle<TDF_Attribute> NewEmpty() const override;
0089
0090 Standard_EXPORT Standard_OStream& Dump(Standard_OStream& anOS) const override;
0091
0092
0093 Standard_EXPORT const NCollection_DoubleMap<int, TDF_Label>& GetFunctions() const;
0094
0095
0096
0097 Standard_EXPORT NCollection_DoubleMap<int, TDF_Label>& ChangeFunctions();
0098
0099 Standard_EXPORT void SetFreeID(const int ID);
0100
0101 Standard_EXPORT int GetFreeID() const;
0102
0103 DEFINE_STANDARD_RTTIEXT(TFunction_Scope, TDF_Attribute)
0104
0105 private:
0106 NCollection_DoubleMap<int, TDF_Label> myFunctions;
0107 int myFreeID;
0108 };
0109
0110 #endif