1 -- Created on: 1992-09-21
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
19 ---Purpose : Gives tools to manage Selecting a group of Entities
20 -- processed by an Interface, for instance to divide up an
21 -- original Model (from a File) to several smaller ones
22 -- They use description of an Interface Model as a graph
24 -- Remark that this corresponds to the description of a
25 -- "scenario" of sharing out a File. Parts of this Scenario
26 -- are intended to be permanently stored. IFSelect provides
27 -- the Transient, active counterparts (to run the Scenario).
28 -- But a permanent one (either as Persistent Objects or as
29 -- interpretable Text) must be provided elsewhere.
31 uses MMgt, Standard, Message, TCollection, TColStd,
32 Interface, IFGraph, Dico, MoniTool
36 deferred class Signature; -- to select an entity according a string (its signature)
37 class SignMultiple; -- liste of signatures
38 class SignType; -- signature = type cdl
39 class SignCategory; -- signature = category
40 class SignValidity; -- signature = validity
41 class SignAncestor; -- signature = type cdl + all ancestors
44 class AppliedModifiers;
49 deferred class Dispatch;
50 class DispGlobal; -- takes all result in only ONE group
51 class DispPerOne; -- defines one group per selected entity
52 class DispPerCount; -- one group for a count of entities
53 class DispPerSignature; -- groups given by a SignatureList
54 class DispPerFiles; -- a determined count of groups
55 -- Other classes can be added for a specific Interface
57 class SelectionIterator;
59 deferred class Selection;
61 deferred class SelectBase; -- attached directly to the ShareOut :
62 class SelectModelRoots; -- roots knows as such in the model
63 class SelectModelEntities; -- all entities of the model
64 class SelectEntityNumber; -- one entity having a given Number
65 class SelectPointed; -- directly pointed items
67 deferred class SelectCombine; -- algebraic operators
68 class SelectUnion; -- "OR" operator between Selections
69 class SelectIntersection; -- "AND" operator between Selections
70 deferred class SelectControl; -- a main list controlled by a second
71 class SelectDiff; -- "Minus" operator between Selections
73 deferred class SelectDeduct; -- computed lists :
74 class SelectShared; -- directly shared entities
75 class SelectSharing; -- directly sharing entities
76 deferred class SelectAnyList; -- from a list in an entity
77 deferred class SelectInList; -- from a list of single entities
78 class SelectSuite; -- macro-select-deduct
80 deferred class SelectExtract; -- sorted lists (can be inverted) :
81 class SelectUnknownEntities;
82 class SelectErrorEntities;
83 class SelectIncorrectEntities; -- (according ComputeCheck)
84 class SelectRoots; -- roots local in a given group
85 class SelectRootComps; -- idem but manages cycles
86 class SelectRange; -- range in a list (from i-th to j-th)
87 deferred class SelectAnyType; -- type to be precised in sub-class
88 class SelectType; -- type given as a parameter
89 class SelectSignature; -- signature matching
90 class SelectFlag; -- flag recorded in the Graph
91 class SelectSent; -- sent/remaining entities to file
92 -- Other classes can be added for a specific Interface
93 -- (in particular, instantiations of SelectType)
95 -- Other classes can be added for a specific Interface
96 deferred class SelectExplore;
97 class SelectSignedShared; -- shared entities + signature
98 class SelectSignedSharing; -- sharing entities + signature
100 class IntParam; -- defines externally accessible integer parameters
107 deferred class Editor;
113 class ContextModif; -- (set of data used by Modifiers)
114 class ContextWrite; -- (set of data used by Modifiers)
115 deferred class Transformer; -- frame for data transformations
116 class TransformStandard; -- works with Modifiers
118 class ModelCopier; -- performs transfers (to produce files)
119 deferred class GeneralModifier; -- set of criteria for all Modifiers
120 deferred class Modifier; -- defines modifying actions on transferred model
121 class ModifReorder; -- reorder whole model from roots
122 class ModifEditForm; -- applies an EditForm
123 deferred generic class FileModifier; -- defines actions on file sending
124 deferred generic class ModelModifier; -- specific actions on model
126 -- -- Session Management -- --
128 class WorkSession; -- a set of useful facilities
129 deferred class WorkLibrary; -- capability of user extents
131 alias Option is Option from MoniTool; -- pre-defined values for a field
132 alias Profile is Profile from MoniTool; -- set of options bound/piloted together
135 deferred class SessionDumper;
138 deferred class Activator;
143 -- individual functions to be added by Act
145 enumeration ReturnStatus is RetVoid, RetDone, RetError, RetFail, RetStop;
146 ---Purpose : Qualifies an execution status :
147 -- RetVoid : normal execution which created nothing, or
148 -- no data to process
149 -- RetDone : normal execution with a result
150 -- RetError : error in command or input data, no execution
151 -- RetFail : execution was run and has failed
152 -- RetStop : indicates end or stop (such as Raise)
154 enumeration RemainMode is
155 RemainForget, RemainCompute, RemainDisplay, RemainUndo;
156 -- used to pilot SetRemaining from the WorkSession
158 enumeration PrintCount is ItemsByEntity, CountByItem, ShortByItem, ListByItem, EntitiesByItem, CountSummary,
159 GeneralInfo, Mapping, ResultCount;
162 -- Lets you choose the manner in which you want to analyze an
163 -- IGES or STEP file. Your analysis can be either message-oriented or
164 -- entity-oriented. The specific values are as follows:
165 -- - ItemsByEntity is a sequential list of all
166 -- messages per entity of the defined type
167 -- - CountByItem is the number of entities of the defined
168 -- type, with their rank number per message
169 -- - ShortByItem is the number of entities of the defined
170 -- type, with their types per message; displays the rank
171 -- numbers of the first five entities of the defined type
173 -- - ListByItem is the number of entities of the defined type
174 -- per message and the numbers of the entities
175 -- - EntitiesByItem is the number of entities of the
176 -- defined type, with their types, rank numbers and
177 -- Directory Entry numbers per message
178 -- - GeneralInfo is general information on transfer such as:
179 -- - number of entities
181 -- - number of resulting Open CASCADE shapes
182 -- - number of warnings and failures
183 -- - CountSummary summary statistics for counters and signatures
184 -- - ResultCount information that contains the number of
185 -- roots in the IGES file and the number of resulting Open CASCADE shapes.
186 -- - Mapping of the IGES root entities to the resulting Open
187 -- CASCADE shape (including type and form of the IGES entity
188 -- and type of the resulting shape).
190 enumeration PrintFail is FailOnly, FailAndWarn;
191 ---Purpose: Indicates whether there will
192 -- be information on warnings as well as on failures. The
193 -- terms of this enumeration have the following semantics:
194 -- - IFSelect_FailOnly gives information on failures only
195 -- - IFSelect_FailAndWarn gives information on both
196 -- failures and warnings. used to pilot PrintCheckList
197 enumeration EditValue is
198 Optional, Editable, EditProtected, EditComputed, EditRead, EditDynamic;
199 ---Purpose : Controls access on Values by an Editor
200 -- EditOptional : normal access, in addition may be removed
201 -- Editable : normal access, must be present
202 -- EditProtected : access must be validated
203 -- EditComputed : why write it ? it will be recomputed
204 -- EditRead : no way to write it, only for read
205 -- EditDynamic : not a field, only to be displayed
207 -- -- Instantiations -- --
209 imported TSeqOfDispatch;
210 imported TSeqOfSelection;
211 imported transient class HSeqOfSelection;
213 -- the followings sequences are used by ModelCopier (definition or result)
214 imported SequenceOfGeneralModifier;
215 imported SequenceOfInterfaceModel;
216 imported SequenceOfAppliedModifiers;
218 -- Package Methods --
220 SaveSession (WS : any WorkSession; file : CString) returns Boolean;
221 ---Purpose : Saves the state of a WorkSession from IFSelect, by using a
222 -- SessionFile from IFSelect. Returns True if Done, False in
223 -- case of Error on Writing. <file> gives the name of the File
224 -- to be produced (this avoids to export the class SessionFile).
226 RestoreSession (WS : WorkSession; file : CString) returns Boolean;
227 ---Purpose : Restore the state of a WorkSession from IFSelect, by using a
228 -- SessionFile from IFSelect. Returns True if Done, False in
229 -- case of Error on Writing. <file> gives the name of the File
230 -- to be used (this avoids to export the class SessionFile).