0024624: Lost word in license statement in source files
[occt.git] / src / TNaming / TNaming_UsedShapes.cdl
1 -- Created on: 1997-02-05
2 -- Created by: Yves FRICAUD
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 private class UsedShapes from TNaming inherits Attribute from TDF
18
19         ---Purpose: Set of Shapes Used in a Data from TDF
20         --          Only one instance by Data, it always
21         --          Stored as Attribute of The Root.
22
23 uses
24     GUID                      from Standard,
25     DataMapOfShapePtrRefShape from TNaming,
26     RelocationTable           from TDF,
27     AttributeIndexedMap       from TDF,
28     Attribute                 from TDF,
29     AttributeDelta            from TDF, 
30     DeltaOnAddition           from TDF, 
31     DeltaOnRemoval            from TDF,
32     Delta                     from TDF,
33     DataSet                   from TDF
34
35 is
36
37     Create returns mutable UsedShapes from TNaming 
38     is private;
39
40     Destroy(me : mutable);
41     ---C++: alias ~
42
43     Map (me: mutable) returns DataMapOfShapePtrRefShape from TNaming;
44         ---C++: return &
45         ---C++: inline
46
47     ID(me) returns GUID from Standard
48     is redefined static;
49         ---Purpose: Returns the ID of the attribute.
50         ---C++: inline  
51         ---C++: return const &                  
52   
53     GetID(myclass) returns GUID from Standard;
54         ---Purpose: Returns the ID: 2a96b614-ec8b-11d0-bee7-080009dc3333.
55         ---C++: return const &
56     
57     BackupCopy(me) returns mutable Attribute from TDF
58     is redefined;
59         ---Purpose: Copies  the attribute  contents into  a  new other
60         --          attribute. It is used by Backup().
61
62     Restore(me: mutable; anAttribute : Attribute from TDF)
63     is redefined;
64         ---Purpose: Restores the contents from <anAttribute> into this
65         --          one. It is used when aborting a transaction.
66
67     BeforeRemoval(me: mutable)
68         is redefined;
69         ---Purpose: Clears the table.
70
71     AfterUndo(me: mutable;
72               anAttDelta : AttributeDelta from TDF;
73               forceIt : Boolean from Standard = Standard_False)
74         returns Boolean from Standard
75         is redefined;
76         ---Purpose: Something to do after applying <anAttDelta>.
77
78  
79     ---Category: Delta generation
80     --           =================================================
81
82     DeltaOnAddition(me)
83         returns DeltaOnAddition from TDF is redefined;
84         ---Purpose : this method returns a null handle (no delta).
85         
86
87
88     DeltaOnRemoval(me)
89         returns DeltaOnRemoval from TDF is redefined;
90         ---Purpose : this method returns a null handle (no delta).
91         
92
93
94     -- Copy use methods
95     -- ----------------
96
97     NewEmpty(me)
98         returns mutable Attribute from TDF
99         is redefined;
100         ---Purpose: Returns an new empty attribute from the good end
101         --          type. It is used by the copy algorithm.
102
103     Paste(me;
104           intoAttribute    : mutable Attribute from TDF;
105           aRelocTationable : mutable RelocationTable from TDF)
106         is redefined;
107         ---Purpose: This method is different from the "Copy" one,
108         --          because it is used when copying an attribute from
109         --          a source structure into a target structure. This
110         --          method pastes the current attribute to the label
111         --          corresponding to the insertor. The pasted
112         --          attribute may be a brand new one or a new version
113         --          of the previous one.
114  
115     References(me; aDataSet : DataSet from TDF)
116         is redefined;
117         ---Purpose: Adds the directly referenced attributes and labels
118         --          to <aDataSet>. "Directly" means we have only to
119         --          look at the first level of references.
120         --          
121         --          For this, use only the AddLabel() & AddAttribute()
122         --          from DataSet and do not try to modify information
123         --          previously stored in <aDataSet>.
124
125
126     -- Miscelleaneous
127     -- --------------
128     Dump(me; anOS : in out OStream from Standard)
129         returns OStream from Standard
130         is redefined ;
131         ---Purpose: Dumps the attribute on <aStream>.
132         ---C++ : return &
133
134
135 fields
136     myMap : DataMapOfShapePtrRefShape from TNaming;
137     
138 friends
139     class Builder from TNaming
140
141 end UsedShapes;