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