1 // Copyright (c) 2015 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #ifndef _StdObjMgt_Persistent_HeaderFile
15 #define _StdObjMgt_Persistent_HeaderFile
18 #include <Standard.hxx>
19 #include <Standard_Handle.hxx>
20 #include <Standard_Transient.hxx>
22 class StdObjMgt_ReadData;
26 //! Root class for a temporary object that reads data from a file and then
27 //! creates transient object using the data.
28 class StdObjMgt_Persistent : public Standard_Transient
31 //! Create a derived class instance.
32 typedef Handle(StdObjMgt_Persistent) (*Instantiator)();
34 //! Read persistent data from a file.
35 Standard_EXPORT virtual void Read (StdObjMgt_ReadData& theReadData) = 0;
37 //! Import transient attribuite from the persistent data
38 //! (to be overriden by attribute classes;
39 //! returns a null handle by default for non-attribute classes).
40 Standard_EXPORT virtual Handle(TDF_Attribute) ImportAttribute() const;
43 #endif // _StdObjMgt_Persistent_HeaderFile