Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-20 09:19:00

0001 // Copyright (c) 2015 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _StdPersistent_DataXtd_PatternStd_HeaderFile
0015 #define _StdPersistent_DataXtd_PatternStd_HeaderFile
0016 
0017 #include <StdObjMgt_Attribute.hxx>
0018 
0019 #include <TDataXtd_PatternStd.hxx>
0020 
0021 class StdPersistent_DataXtd_PatternStd : public StdObjMgt_Attribute<TDataXtd_PatternStd>
0022 {
0023 public:
0024   //! Read persistent data from a file.
0025   inline void Read(StdObjMgt_ReadData& theReadData)
0026   {
0027     theReadData >> mySignature >> myAxis1Reversed >> myAxis2Reversed >> myAxis1 >> myAxis2
0028       >> myValue1 >> myValue2 >> myNb1 >> myNb2 >> myMirror;
0029   }
0030 
0031   //! Write persistent data to a file.
0032   inline void Write(StdObjMgt_WriteData& theWriteData)
0033   {
0034     theWriteData << mySignature << myAxis1Reversed << myAxis2Reversed << myAxis1 << myAxis2
0035                  << myValue1 << myValue2 << myNb1 << myNb2 << myMirror;
0036   }
0037 
0038   //! Gets persistent child objects
0039   inline void PChildren(StdObjMgt_Persistent::SequenceOfPersistent& theChildren) const
0040   {
0041     theChildren.Append(myAxis1);
0042     theChildren.Append(myAxis2);
0043     theChildren.Append(myValue1);
0044     theChildren.Append(myValue2);
0045     theChildren.Append(myNb1);
0046     theChildren.Append(myNb2);
0047     theChildren.Append(myMirror);
0048   }
0049 
0050   //! Returns persistent type name
0051   inline const char* PName() const { return "PDataXtd_PatternStd"; }
0052 
0053   //! Import transient attribute from the persistent data.
0054   void Import(const occ::handle<TDataXtd_PatternStd>& theAttribute) const;
0055 
0056 private:
0057   int                               mySignature;
0058   bool                              myAxis1Reversed;
0059   bool                              myAxis2Reversed;
0060   occ::handle<StdObjMgt_Persistent> myAxis1;
0061   occ::handle<StdObjMgt_Persistent> myAxis2;
0062   occ::handle<StdObjMgt_Persistent> myValue1;
0063   occ::handle<StdObjMgt_Persistent> myValue2;
0064   occ::handle<StdObjMgt_Persistent> myNb1;
0065   occ::handle<StdObjMgt_Persistent> myNb2;
0066   occ::handle<StdObjMgt_Persistent> myMirror;
0067 };
0068 
0069 #endif