Integration of OCCT 6.5.0 from SVN
[occt.git] / src / Standard / Standard_Persistent_proto.hxx
CommitLineData
7fd59977 1#ifndef _Standard_Persistent_proto_HeaderFile
2#define _Standard_Persistent_proto_HeaderFile
3
4#ifndef _Standard_Macro_HeaderFile
5#include <Standard_Macro.hxx>
6#endif
7#ifndef _Standard_PrimitiveTypes_HeaderFile
8#include <Standard_PrimitiveTypes.hxx>
9#endif
10#ifndef _Standard_HeaderFile
11#include <Standard.hxx>
12#endif
13
14class Handle_Standard_Persistent;
15class Standard_Type;
16class Handle_Standard_Type;
17class Standard_Type;
18
19class Storage_stCONSTclCOM;
20Standard_EXPORT Standard_Address StandardCSFDB_Allocate(const Standard_Size);
21Standard_EXPORT void StandardCSFDB_Free(Standard_Address&);
22Standard_EXPORT Handle_Standard_Type& Standard_Persistent_Type_();
23
24class Standard_Persistent
25{
26friend class Handle(Standard_Persistent);
27friend class Storage_Schema;
28
29private:
30 Standard_Integer count;
31 Standard_Integer _typenum;
32 Standard_Integer _refnum;
33public:
34 // MEMORY MANAGER
35 //
36 void* operator new (size_t s) {
37 return StandardCSFDB_Allocate(s);
38 }
39
40 void operator delete (void* p) {
41 StandardCSFDB_Free(p);
42 }
43
44 void* operator new(size_t,void* anAddress) {
45 return anAddress;
46 }
47
48 Standard_EXPORT virtual Handle_Standard_Persistent This() const;
49 Standard_EXPORT virtual Handle_Standard_Persistent ShallowCopy () const;
50 Standard_EXPORT virtual void Delete() const;
51 Standard_EXPORT virtual ~Standard_Persistent();
52
53 Standard_EXPORT Standard_Persistent& operator= (const Standard_Persistent&);
54 Standard_Persistent() : count(0),_typenum(0),_refnum(0) {};
55 Standard_Persistent(const Standard_Persistent&) : count(0),_typenum(0),_refnum(0) {};
56 Standard_Persistent(const Storage_stCONSTclCOM&) : count(0),_typenum(0),_refnum(0) {}
57
58 Standard_EXPORT virtual const Handle_Standard_Type& DynamicType() const;
59 Standard_EXPORT Standard_Boolean IsKind(const Handle_Standard_Type&)const;
60 Standard_EXPORT Standard_Boolean IsInstance(const Handle_Standard_Type&)const;
61 Standard_EXPORT virtual Standard_Integer HashCode(const Standard_Integer Upper) const;
62 Standard_EXPORT virtual void ShallowDump(Standard_OStream& ) const;
63};
64
65#include <Handle_Standard_Persistent.hxx>
66
67#endif
68
69
70
71
72
73
74
75