0023024: Update headers of OCCT files
[occt.git] / src / Standard / Standard_Persistent.cdl
CommitLineData
b311480e 1-- Created on: 1992-08-24
2-- Created by: Ramin BARRETO
3-- Copyright (c) 1992-1999 Matra Datavision
4-- Copyright (c) 1999-2012 OPEN CASCADE SAS
5--
6-- The content of this file is subject to the Open CASCADE Technology Public
7-- License Version 6.5 (the "License"). You may not use the content of this file
8-- except in compliance with the License. Please obtain a copy of the License
9-- at http://www.opencascade.org and read it completely before using this file.
10--
11-- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12-- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13--
14-- The Original Code and all software distributed under the License is
15-- distributed on an "AS IS" basis, without warranty of any kind, and the
16-- Initial Developer hereby disclaims all such warranties, including without
17-- limitation, any warranties of merchantability, fitness for a particular
18-- purpose or non-infringement. Please see the License for the specific terms
19-- and conditions governing the rights and limitations under the License.
20
7fd59977 21
22deferred class Persistent from Standard
23inherits
24 Storable from Standard
25
26 ---Purpose:
27 -- The root of the entire persistent class hierarchy.
28 --
29 -- Persistence is the ability to create objects which
30 -- outlive the application process.
31 -- Objects stored in the database must be instances
32 -- of a Persistent-derived class.
33 -- The collection of persistent classes used by an
34 -- application constitute its application data schema.
35 --
36 -- Open CASCADE provides persistent classes to describe:
37 -- - ASCII (normal 8 bit character type) and
38 -- Unicode (16 bit character type) strings,
39 -- - arrays of persistent data,
40 -- - geometric data structures,
41 -- - topological data structures.
42 --
43 -- The user can enrich this set of persistent classes by describing
44 -- his own persistent data structures inheriting from Persistent
45 -- for use in a store and retrieve programming context.
46 --
47 -- Warning:
48 --
49 -- Persistent objects are manipulated in programs by handles.
50 -- A handle to a persistent object behaves like
51 -- a pointer to the entire database address space.
52 -- In using such a handle, you transparently operate on the object
53 -- in the database, providing that you do this inside a transaction.
54 --
55 -- However "Persistent Programming" (i.e. the programming
56 -- technique whereby the application operates on persistent
57 -- objects, that is, directly in the database, within a transaction)
58 -- is not supported by Open CASCADE.
59
60uses
61 Type from Standard
62 ,Boolean from Standard
63 ,OId from Standard
64
65is
66
67 ShallowCopy (me) returns mutable like me is deferred;
68 ---Purpose: Returns a copy at the first level of <me>.
69 -- The objects referenced are not copied.
70 -- Entities copied by ShallowCopy are equal.
71 ---C++: function call
72 ---Level: Advanced
73
74 Delete (me: mutable) is redefined;
75 ---Purpose: Deletes this object.
76
77
78 DynamicType (me) returns Type is virtual;
79 ---Purpose:
80 -- Returns the type object representing the actual type of the object.
81 -- There is one type object per Persistent-derived class.
82 --
83 -- Example:
84 --
85 -- Handle(Standard_Persistent) p;
86 -- Handle(Standard_Type) t;
87 -- p = new PGeom_CartesianPoint(0.,0.,0.);
88 -- t = STANDARD_TYPE(PGeom_CartesianPoint);
89 -- assert(p->DynamicType() == t);
90
91 IsInstance (me; TheType : Type) returns Boolean is static;
92 ---Purpose:
93 -- Returns true if the actual type of the object is equal to the given type.
94 --
95 -- Example:
96 --
97 -- Handle(Standard_Persistent) p;
98 -- Handle(Standard_Type) t;
99 -- p = new PGeom_CartesianPoint(0.,0.,0.);
100 -- t = STANDARD_TYPE(PGeom_CartesianPoint);
101 -- assert(p->IsInstance(t));
102 --
103 -- Warning:
104 --
105 -- For most purposes it is better to use IsKind because IsInstance
106 -- rejects objects being subtype of the given type.
107
108 IsKind (me; TheType : Type) returns Boolean
109 ---Purpose:
110 -- Returns true if <me> is an instance of <aType> or an
111 -- instance of any class that inherits from <aType>.
112 -- All persistent objects are a kind of Object class.
113 --
114 -- Example:
115 --
116 -- Handle(Standard_Persistent) p;
117 -- Handle(Standard_Type) tp, tt;
118 -- p = new PGeom_CartesianPoint(0.,0.,0.);
119 -- tp = STANDARD_TYPE(PGeom_CartesianPoint);
120 -- tt = STANDARD_TYPE(Standard_Persistent);
121 -- assert(p->IsKind(tp));
122 -- assert(p->IsKind(tt));
123 is static;
124
125 This (me) returns mutable Persistent
126 ---Purpose: Returns a handle on the object.
127 -- This method is useful only in constructors of persistent
128 -- objects when you need a handle on the object being constructed.
129 -- It guarantees that, whatever the underlying database
130 -- you are using, the object will not be swapped out
131 -- during its construction.
132 is static protected;
133
134end Persistent from Standard;
135
136
137