File indexing completed on 2026-09-15 09:17:02
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef _StdPersistent_Naming_HeaderFile
0015 #define _StdPersistent_Naming_HeaderFile
0016
0017 #include <StdObjMgt_Attribute.hxx>
0018 #include <StdObjMgt_Persistent.hxx>
0019 #include <StdPersistent_HArray1.hxx>
0020 #include <StdLPersistent_HArray1.hxx>
0021 #include <StdLPersistent_HString.hxx>
0022
0023 #include <TNaming_Naming.hxx>
0024
0025 class TNaming_Name;
0026
0027 class StdPersistent_Naming
0028 {
0029 public:
0030 class NamedShape : public StdObjMgt_Attribute<TNaming_NamedShape>
0031 {
0032 public:
0033
0034 inline void Read(StdObjMgt_ReadData& theReadData)
0035 {
0036 theReadData >> myOldShapes >> myNewShapes >> myShapeStatus >> myVersion;
0037 }
0038
0039
0040 inline void Write(StdObjMgt_WriteData& theWriteData) const
0041 {
0042 theWriteData << myOldShapes << myNewShapes << myShapeStatus << myVersion;
0043 }
0044
0045
0046 inline void PChildren(StdObjMgt_Persistent::SequenceOfPersistent& theChildren) const
0047 {
0048 if (!myOldShapes.IsNull())
0049 theChildren.Append(myOldShapes);
0050 if (!myNewShapes.IsNull())
0051 theChildren.Append(myNewShapes);
0052 }
0053
0054
0055 inline const char* PName() const { return "PNaming_NamedShape"; }
0056
0057
0058 void Import(const occ::handle<TNaming_NamedShape>& theAttribute) const;
0059
0060 private:
0061 Handle(StdPersistent_HArray1::Shape1) myOldShapes;
0062 Handle(StdPersistent_HArray1::Shape1) myNewShapes;
0063 int myShapeStatus;
0064 int myVersion;
0065 };
0066
0067 class Name : public StdObjMgt_Persistent
0068 {
0069 public:
0070
0071 Standard_EXPORT void Read(StdObjMgt_ReadData& theReadData) override;
0072
0073 Standard_EXPORT void Write(StdObjMgt_WriteData& theWriteData) const override;
0074
0075
0076 inline void PChildren(StdObjMgt_Persistent::SequenceOfPersistent& theChildren) const override
0077 {
0078 if (!myArgs.IsNull())
0079 theChildren.Append(myArgs);
0080 if (!myStop.IsNull())
0081 theChildren.Append(myStop);
0082 }
0083
0084
0085 inline const char* PName() const override { return "PNaming_Name"; }
0086
0087
0088 Standard_EXPORT virtual void Import(TNaming_Name& theName,
0089 const occ::handle<TDF_Data>& theDF) const;
0090
0091 private:
0092 int myType;
0093 int myShapeType;
0094 Handle(StdLPersistent_HArray1::Persistent) myArgs;
0095 occ::handle<StdObjMgt_Persistent> myStop;
0096 int myIndex;
0097 };
0098
0099 class Name_1 : public Name
0100 {
0101 public:
0102
0103 Standard_EXPORT void Read(StdObjMgt_ReadData& theReadData) override;
0104
0105 Standard_EXPORT void Write(StdObjMgt_WriteData& theWriteData) const override;
0106
0107
0108 inline void PChildren(StdObjMgt_Persistent::SequenceOfPersistent& theChildren) const override
0109 {
0110 Name::PChildren(theChildren);
0111 if (!myContextLabel.IsNull())
0112 theChildren.Append(myContextLabel);
0113 }
0114
0115
0116 inline const char* PName() const override { return "PNaming_Name_1"; }
0117
0118
0119 Standard_EXPORT void Import(TNaming_Name& theName,
0120 const occ::handle<TDF_Data>& theDF) const override;
0121
0122 private:
0123 Handle(StdLPersistent_HString::Ascii) myContextLabel;
0124 };
0125
0126 class Name_2 : public Name_1
0127 {
0128 public:
0129
0130 Standard_EXPORT void Read(StdObjMgt_ReadData& theReadData) override;
0131
0132 Standard_EXPORT void Write(StdObjMgt_WriteData& theWriteData) const override;
0133
0134
0135 inline void PChildren(StdObjMgt_Persistent::SequenceOfPersistent& theChildren) const override
0136 {
0137 Name_1::PChildren(theChildren);
0138 }
0139
0140
0141 inline const char* PName() const override { return "PNaming_Name_2"; }
0142
0143
0144 Standard_EXPORT void Import(TNaming_Name& theName,
0145 const occ::handle<TDF_Data>& theDF) const override;
0146
0147 private:
0148 int myOrientation;
0149 };
0150
0151 class Naming : public StdObjMgt_Attribute<TNaming_Naming>::SingleRef
0152 {
0153 public:
0154
0155 Standard_EXPORT void ImportAttribute() override;
0156 };
0157
0158 class Naming_1 : public Naming
0159 {
0160 public:
0161
0162 Standard_EXPORT void ImportAttribute() override;
0163 };
0164
0165 typedef Naming Naming_2;
0166 };
0167
0168 #endif