File indexing completed on 2025-01-18 10:04:59
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #ifndef _StdLPersistent_Variable_HeaderFile
0016 #define _StdLPersistent_Variable_HeaderFile
0017
0018 #include <StdObjMgt_Attribute.hxx>
0019 #include <StdLPersistent_HString.hxx>
0020
0021 #include <TDataStd_Variable.hxx>
0022
0023
0024 class StdLPersistent_Variable : public StdObjMgt_Attribute<TDataStd_Variable>
0025 {
0026 public:
0027
0028 StdLPersistent_Variable()
0029 : myIsConstant(Standard_False)
0030 {
0031 }
0032
0033 inline void Read (StdObjMgt_ReadData& theReadData)
0034 { theReadData >> myIsConstant >> myUnit; }
0035
0036 inline void Write (StdObjMgt_WriteData& theWriteData) const
0037 { theWriteData << myIsConstant << myUnit; }
0038
0039 inline void PChildren(StdObjMgt_Persistent::SequenceOfPersistent& theChildren) const
0040 { theChildren.Append(myUnit); }
0041
0042 inline Standard_CString PName() const { return "PDataStd_Variable"; }
0043
0044
0045 void Import (const Handle(TDataStd_Variable)& theAttribute) const
0046 {
0047 theAttribute->Constant (myIsConstant);
0048 if (myUnit)
0049 theAttribute->Unit (myUnit->Value()->String());
0050 }
0051
0052 private:
0053 Standard_Boolean myIsConstant;
0054 Handle(StdLPersistent_HString::Ascii) myUnit;
0055 };
0056
0057 #endif