Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:59

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 
0015 #ifndef _StdLPersistent_Void_HeaderFile
0016 #define _StdLPersistent_Void_HeaderFile
0017 
0018 #include <StdObjMgt_Attribute.hxx>
0019 
0020 #include <TDataStd_Directory.hxx>
0021 #include <TDataStd_Tick.hxx>
0022 #include <TDataStd_NoteBook.hxx>
0023 
0024 
0025 class StdLPersistent_Void
0026 {
0027 protected:
0028   template <class AttribClass>
0029   class instance : public StdObjMgt_Attribute<AttribClass>::Static
0030   {
0031   public:
0032     //! Read persistent data from a file.
0033     virtual void Read (StdObjMgt_ReadData&) {}
0034     //! Write persistent data to a file.
0035     virtual void Write (StdObjMgt_WriteData&) const {}
0036     //! Gets persistent child objects
0037     inline void PChildren(StdObjMgt_Persistent::SequenceOfPersistent&) const {}
0038     //! Returns persistent type name
0039     Standard_CString PName() const;
0040 
0041     //! Import transient attribute from the persistent data
0042     virtual void ImportAttribute() {}
0043   };
0044 
0045 public:
0046   typedef instance<TDataStd_Directory> Directory;
0047   typedef instance<TDataStd_Tick>      Tick;
0048   typedef instance<TDataStd_NoteBook>  NoteBook;
0049 };
0050 
0051 template<>
0052 inline Standard_CString StdLPersistent_Void::instance<TDataStd_Directory>::PName() const
0053   { return "PDataStd_Directory"; }
0054 
0055 template<>
0056 inline Standard_CString StdLPersistent_Void::instance<TDataStd_Tick>::PName() const
0057   { return "PDataStd_Tick"; }
0058 
0059 template<>
0060 inline Standard_CString StdLPersistent_Void::instance<TDataStd_NoteBook>::PName() const
0061   { return "PDataStd_Notebook"; }
0062 
0063 #endif