0022627: Change OCCT memory management defaults
[occt.git] / src / IFSelect / IFSelect_SessionDumper.cdl
1 -- File:        IFSelect_SessionDumper.cdl
2 -- Created:     Thu Nov  4 10:47:11 1993
3 -- Author:      Christian CAILLET
4 --              <cky@sdsun2>
5 ---Copyright:    Matra Datavision 1993
6
7
8 deferred class SessionDumper  from IFSelect  inherits TShared
9
10     ---Purpose : A SessionDumper is called by SessionFile. It takes into
11     --           account a set of classes (such as Selections, Dispatches ...).
12     --           SessionFile writes the Type (as defined by cdl) of each Item
13     --           and its general Parameters. It manages the names of the Items.
14     --           
15     --           A SessionDumper must be able to Write the Parameters which are
16     --           own of each Item it takes into account, given its Class, then
17     --           to Recognize the Type and Read its Own Parameters to create
18     --           an Item of this Type with these own Parameters.
19     --           
20     --           Then, there must be defined one sub-type of SessionDumper per
21     --           consistent set of classes (e.g. a package).
22     --           
23     --           By Own Parameters, understand Parameters given at Creation Time
24     --           if there are, or specific of a given class, apart from those
25     --           defined at superclass levels (e.g. Final Selection for a
26     --           Dispatch, Input Selection for a SelectExtract or SelectDeduct,
27     --           Direct Status for a SelectExtract, etc...).
28     --           
29     --           The Parameters are those stored in a WorkSession, they can be
30     --           of Types : IntParam, HAsciiString (for TextParam), Selection,
31     --           Dispatch.
32     --           
33     --           SessionDumpers are organized in a Library which is used by
34     --           SessionFile. They are put at Creation Time in this Library.
35
36 uses Transient, AsciiString from TCollection, SessionFile
37
38 is
39
40     Initialize;
41     ---Purpose : The Initialization puts a just created SessionDumper in the
42     --           Library of SessionDumper. Then, it suffices to create once
43     --           a SessionDumper to fill the Library with it
44
45     First (myclass) returns SessionDumper;
46     ---Purpose : Returns the First item of the Library of Dumper. The Next ones
47     --           are then obtained by Next on the returned items
48
49     Next (me) returns SessionDumper;
50     ---Purpose : Returns the Next SesionDumper in the Library. Returns a Null
51     --           Handle at the End.
52
53     WriteOwn (me; file : in out SessionFile; item : Transient)
54         returns Boolean  is deferred;
55     ---Purpose : Writes the Own Parameters of a given Item, if it forecast to
56     --           manage its Type.
57     --           Returns True if it has recognized the Type of the Item (in
58     --           this case, it is assumed to have written the Own Parameters if
59     --           there are some), False else : in that case, SessionFile will
60     --           try another SessionDumper in the Library.
61     --           WriteOwn can use these methods from SessionFile : SendVoid,
62     --           SendItem, SendText, and if necessary, WorkSession.
63
64     ReadOwn  (me; file : in out SessionFile;
65             type : AsciiString from TCollection; item : out mutable Transient)
66         returns Boolean  is deferred;
67     ---Purpose : Recognizes a Type (given as <type>) then Creates an Item of
68     --           this Type with the Own Parameter, as required.
69     --           Returns True if it has recognized the Type (in this case, it
70     --           is assumed to have created the Item, returned as <item>),
71     --           False else : in that case, SessionFile will try another
72     --           SessionDumper in the Library.
73     --           ReadOwn can use these methods from SessionFile to access Own
74     --           Parameters : NbOwnParams, IsVoid, IsText, TextValue, ItemValue
75
76 fields
77
78     thenext : SessionDumper;
79
80 end SessionDumper;