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