0022749: Segfault in HashCode() of Standard_Transient
[occt.git] / src / Standard / Standard_Persistent.cdl
1 -- File:        Standard_Persistent.cdl
2 -- Created:     Mon Aug 24 13:11:56 1992
3 -- Author:      Ramin BARRETO
4 --              <rba@sdsun3>
5
6 deferred class Persistent from Standard 
7 inherits
8     Storable from Standard 
9     
10             ---Purpose: 
11             -- The root of the entire persistent class hierarchy.
12             --
13             -- Persistence is the ability to create objects which
14             -- outlive the application process.
15             -- Objects stored in the database must be instances
16             -- of a Persistent-derived class. 
17             -- The collection of persistent classes used by an 
18             -- application constitute its application data schema.
19             --
20             -- Open CASCADE provides persistent classes to describe:
21             -- - ASCII (normal 8 bit character type) and
22             --   Unicode (16 bit character type) strings,
23             -- - arrays of persistent data,
24             -- - geometric data structures,
25             -- - topological data structures.
26             --
27             -- The user can enrich this set of persistent classes by describing
28             -- his own persistent data structures inheriting from Persistent 
29             -- for use in a store and retrieve programming context.
30             --
31             -- Warning:
32             --
33             -- Persistent objects are manipulated in programs by handles. 
34             -- A handle to a persistent object behaves like
35             -- a pointer to the entire database address space. 
36             -- In using such a handle, you transparently operate on the object 
37             -- in the database, providing that you do this inside a transaction.
38             --
39             -- However "Persistent Programming" (i.e. the programming 
40             -- technique whereby the application operates on persistent 
41             -- objects, that is, directly in the database, within a transaction) 
42             -- is not supported by Open CASCADE.
43         
44 uses
45     Type from Standard
46    ,Boolean from Standard
47    ,OId from Standard
48          
49 is
50
51         ShallowCopy (me) returns mutable like me is deferred;
52             ---Purpose: Returns a copy at the first level of <me>. 
53             --          The objects  referenced are not copied. 
54             --          Entities copied by ShallowCopy are equal.
55             ---C++:  function call
56             ---Level: Advanced
57
58         Delete (me: mutable) is redefined;
59             ---Purpose: Deletes this object.
60             
61
62         DynamicType (me) returns Type is virtual;
63             ---Purpose: 
64             -- Returns the type object representing the actual type of the object. 
65             -- There is one type object per Persistent-derived class.
66             --
67             -- Example:
68             --
69             -- Handle(Standard_Persistent) p;
70             -- Handle(Standard_Type)    t;
71             -- p = new PGeom_CartesianPoint(0.,0.,0.);
72             -- t = STANDARD_TYPE(PGeom_CartesianPoint);
73             -- assert(p->DynamicType() == t);
74         
75         IsInstance (me; TheType : Type) returns Boolean is static;
76             ---Purpose: 
77             -- Returns true if the actual type of the object is equal to the given type.
78             --
79             -- Example:
80             --
81             -- Handle(Standard_Persistent) p;
82             -- Handle(Standard_Type)    t;
83             -- p = new PGeom_CartesianPoint(0.,0.,0.);
84             -- t = STANDARD_TYPE(PGeom_CartesianPoint);
85             -- assert(p->IsInstance(t));
86             --
87             -- Warning:
88             --
89             -- For most purposes it is better to use IsKind because IsInstance
90             -- rejects objects being subtype of the given type.
91                       
92         IsKind (me; TheType : Type) returns Boolean 
93             ---Purpose: 
94             -- Returns true if <me> is an instance of <aType> or an
95             -- instance of any class that inherits from <aType>.
96             -- All persistent objects are a kind of Object class.
97             --
98             -- Example:
99             --
100             -- Handle(Standard_Persistent) p;
101             -- Handle(Standard_Type)    tp, tt;
102             -- p = new PGeom_CartesianPoint(0.,0.,0.);
103             -- tp = STANDARD_TYPE(PGeom_CartesianPoint);
104             -- tt = STANDARD_TYPE(Standard_Persistent);
105             -- assert(p->IsKind(tp));
106             -- assert(p->IsKind(tt));   
107         is static;
108             
109         This (me) returns mutable Persistent
110             ---Purpose:  Returns a handle on the object. 
111             -- This method is useful only in constructors of persistent 
112             -- objects when you need a handle on the object being constructed. 
113             -- It guarantees that, whatever the underlying database 
114             -- you are using, the object will not be swapped out 
115             -- during its construction.
116         is static protected;
117
118 end Persistent from Standard;
119
120
121