0022807: Loading of STEP entities in model during reading of STEP file requires redun...
[occt.git] / src / Interface / Interface_ShareTool.cdl
1 -- File:        Interface_ShareTool.cdl
2 -- Created:     Tue Feb  2 16:04:36 1993
3 -- Author:      Christian CAILLET
4 --              <cky@phobox>
5 ---Copyright:    Matra Datavision 1993
6
7
8 class ShareTool  from Interface
9
10     ---Purpose : Builds the Graph of Dependancies, from the General Service
11     --           "Shared" -> builds for each Entity of a Model, the Shared and
12     --           Sharing Lists, and gives access to them.
13     --           Allows to complete with Implied References (which are not
14     --           regarded as Shared Entities, but are nevertheless Referenced),
15     --           this can be usefull for Reference Checking
16
17 uses Type, Transient,
18      Graph, HGraph, InterfaceModel, EntityIterator,
19      Messenger from Message,
20      Protocol from Interface, GeneralLib,  GTool
21
22 raises DomainError, InterfaceError
23
24 is
25
26     Create (amodel : InterfaceModel; lib : GeneralLib) returns ShareTool;
27     ---Purpose : Creates a ShareTool from a Model and builds all required data,
28     --           by calling the General Service Library and Modules
29     --           (GeneralLib given as an argument)
30
31     Create (amodel : InterfaceModel; gtool : GTool from Interface)
32         returns ShareTool;
33     ---Purpose : Same a above, but GeneralLib is detained by a GTool
34
35     Create (amodel : InterfaceModel; protocol : Protocol from Interface)
36         returns ShareTool;
37     ---Purpose : Same a above, but GeneralLib is defined through a Protocol
38     --           Protocol is used to build the working library
39
40     Create (amodel : InterfaceModel) returns ShareTool;
41     ---Purpose : Same as above, but works with the GTool of the Model
42
43     Create (agraph : Graph) returns ShareTool;
44     ---Purpose : Creates a ShareTool from an already defined Graph
45     --           Remark that the data of the Graph are copied
46     
47     Create (ahgraph : HGraph) returns ShareTool;
48
49     --AddImplied (me : in out; gtool : GTool from Interface);
50     ---Purpose : Completes the Graph by Adding Implied References. Hence, they
51     --           are considered as Sharing References in all the other queries
52
53     Model (me) returns InterfaceModel;
54     ---Purpose : Returns the Model used for Creation (directly or for Graph)
55
56     Graph (me) returns Graph;
57     ---Purpose : Returns the data used by the ShareTool to work
58     --           Can then be used directly (read only)
59     ---C++ : return const &
60
61     RootEntities (me) returns EntityIterator;
62     ---Purpose : Returns the Entities which are not Shared (their Sharing List
63     --           is empty) in the Model
64
65     IsShared (me; ent : Transient) returns Boolean;
66     ---Purpose : Returns True if <ent> is Shared by other Entities in the Model
67
68     Shareds (me; ent : Transient) returns EntityIterator;
69     ---Purpose : Returns the List of Entities Shared by a given Entity <ent>
70
71     Sharings (me; ent : Transient) returns EntityIterator;
72     ---Purpose : Returns the List of Entities Sharing a given Entity <ent>
73
74     NbTypedSharings (me; ent : Transient; atype : any Type) returns Integer;
75     ---Purpose : Returns the count of Sharing Entities of an Entity, which
76     --           are Kind of a given Type
77
78     TypedSharing (me; ent : Transient; atype : any Type) returns Transient
79     ---Purpose : Returns the Sharing Entity of an Entity, which is Kind of a
80     --           given Type. Allows to access a Sharing Entity of a given type
81     --           when there is one and only one (current case)
82         raises InterfaceError;
83     --           Error if count of Typed Sharings is zero or more then one
84
85     All (me; ent : Transient; rootlast : Boolean = Standard_True)
86         returns EntityIterator;
87     ---Purpose : Returns the complete list of entities shared by <ent> at any
88     --           level, including <ent> itself
89     --           If <ent> is the Model, considers the concatenation of
90     --           AllShared for each root
91     --           If <rootlast> is True (D), the list starts with lower level
92     --           entities and ends by the root. Else, the root is first and
93     --           the lower level entities are at end
94
95     Print (me; iter : EntityIterator; S : Messenger from Message);
96     ---Purpose : Utility method which Prints the content of an iterator
97     --           (by their Numbers)
98
99 fields
100
101     theHGraph : HGraph;
102
103 end ShareTool;