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_Real_HeaderFile
0016 #define _StdLPersistent_Real_HeaderFile
0017
0018 #include <StdObjMgt_Attribute.hxx>
0019
0020 #include <TDataStd_Real.hxx>
0021
0022
0023 class StdLPersistent_Real : public StdObjMgt_Attribute<TDataStd_Real>
0024 {
0025 public:
0026
0027 StdLPersistent_Real()
0028 : myValue(0.0),
0029 myDimension(0)
0030 {
0031 }
0032
0033 inline void Read (StdObjMgt_ReadData& theReadData)
0034 { theReadData >> myValue >> myDimension; }
0035
0036 inline void Write (StdObjMgt_WriteData& theWriteData) const
0037 { theWriteData << myValue << myDimension; }
0038
0039 void PChildren(StdObjMgt_Persistent::SequenceOfPersistent&) const {}
0040
0041 Standard_CString PName() const { return "PDataStd_Real"; }
0042
0043
0044 void Import (const Handle(TDataStd_Real)& theAttribute) const
0045 {
0046 theAttribute->Set (myValue);
0047 Standard_DISABLE_DEPRECATION_WARNINGS
0048 theAttribute->SetDimension (static_cast<TDataStd_RealEnum> (myDimension));
0049 Standard_ENABLE_DEPRECATION_WARNINGS
0050 theAttribute->SetID (TDataStd_Real::GetID());
0051 }
0052
0053 private:
0054 Standard_Real myValue;
0055 Standard_Integer myDimension;
0056 };
0057
0058 #endif