1867e7276c747854a621d0027f879e7ccff531d0
[occt.git] / src / Standard / Standard_Persistent_proto.hxx
1 // Copyright (c) 1998-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
6 // This library is free software; you can redistribute it and / or modify it
7 // under the terms of the GNU Lesser General Public version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14
15 #ifndef _Standard_Persistent_proto_HeaderFile
16 #define _Standard_Persistent_proto_HeaderFile
17
18 #ifndef _Standard_Macro_HeaderFile
19 #include <Standard_Macro.hxx>
20 #endif
21 #ifndef _Standard_DefineAlloc_HeaderFile
22 #include <Standard_DefineAlloc.hxx>
23 #endif
24 #ifndef _Standard_PrimitiveTypes_HeaderFile
25 #include <Standard_PrimitiveTypes.hxx>
26 #endif
27 #ifndef _Standard_HeaderFile
28 #include <Standard.hxx>
29 #endif
30
31 class Handle_Standard_Persistent;
32 class Standard_Type;
33 class Handle_Standard_Type;
34 class Standard_Type;
35
36 class Storage_stCONSTclCOM;
37 Standard_EXPORT const Handle_Standard_Type& Standard_Persistent_Type_();
38
39 class Standard_Persistent
40 {
41 friend class Handle(Standard_Persistent);
42 friend class Storage_Schema;
43
44 private:
45   Standard_Integer count;
46   Standard_Integer _typenum;
47   Standard_Integer _refnum;
48 public:
49   
50   DEFINE_STANDARD_ALLOC
51
52   Standard_EXPORT virtual Handle_Standard_Persistent This() const;
53   Standard_EXPORT virtual Handle_Standard_Persistent ShallowCopy () const;
54   Standard_EXPORT virtual void Delete() const;
55   Standard_EXPORT virtual ~Standard_Persistent();
56   
57   Standard_EXPORT Standard_Persistent& operator= (const Standard_Persistent&);
58                   Standard_Persistent() : count(0),_typenum(0),_refnum(0) {}
59                   Standard_Persistent(const Standard_Persistent&) : count(0),_typenum(0),_refnum(0) {}
60                   Standard_Persistent(const Storage_stCONSTclCOM&) : count(0),_typenum(0),_refnum(0) {}
61
62   Standard_EXPORT virtual const Handle_Standard_Type& DynamicType() const;
63   Standard_EXPORT         Standard_Boolean            IsKind(const Handle_Standard_Type&)const;
64   Standard_EXPORT         Standard_Boolean            IsInstance(const Handle_Standard_Type&)const;  
65   Standard_EXPORT virtual void                        ShallowDump(Standard_OStream& ) const;
66 };
67
68 #include <Handle_Standard_Persistent.hxx>
69
70 #endif
71
72
73
74
75
76
77
78