1 -- Created on: 1992-06-22
2 -- Created by: Gilles DEBARBOUILLE
3 -- Copyright (c) 1992-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
23 deferred class MethodDefinitionsDictionary from Dynamic
29 ---Purpose: This class groups in a dictionary of all the
30 -- various definitions of methods. It also allows the
31 -- share of the same definition by more than one
32 -- MethodInstance to preserve a global coherence and
33 -- also to manage the memory. To use this class an
34 -- inheritance is necessary with perhaps the overload
35 -- of the Switch method if the parameter types are
36 -- not of the type BooleanParameter,
37 -- IntegerParameter, RealParameter and
42 CString from Standard,
43 OStream from Standard,
44 Boolean from Standard,
45 Integer from Standard,
46 HAsciiString from TCollection,
47 Parameter from Dynamic,
48 SequenceOfMethodDefinitions from Dynamic,
57 ---Purpose: Deferred constructor of the class.
59 Creates(me : mutable ; afilename : CString from Standard)
63 ---Purpose: Starting with a file named <afilename>, fills the
64 -- dictionary with all the wishes definitions.
68 Definition(me : mutable ; adefinition : Method from Dynamic) returns Boolean from Standard
72 ---Purpose: This method sets the new definition <adefinition> in
73 -- the dictionary. It returns true if the operation is
74 -- successful, false otherwise.
78 Switch(me ; aname , atype , avalue : CString from Standard)
82 ---Purpose: This virtual method allows the user to add recognition
83 -- of its own parameters when reading the file to fill
86 returns Parameter from Dynamic;
88 Definition(me ; atype : CString from Standard
89 ; adefinition : out Method from Dynamic) returns Boolean from Standard
93 ---Purpose: Returns from the dictionary in the out variable
94 -- <adefinition> a reference to the right instance of the
95 -- definition identified by its type <atype>. The method
96 -- returns true if the definition exist, false otherwise.
100 UpToDate(me) returns Boolean from Standard
104 ---Purpose: Returns true if there has been no modification of the
105 -- file method-definitions.dat since the creation of the
106 -- dictionary object, false otherwise.
110 NumberOfDefinitions(me) returns Integer from Standard
114 ---Purpose: Returns the number of definitions stored in the
119 Definition(me ; anindex : Integer from Standard) returns any Method from Dynamic
123 ---Purpose: Returns a reference on the definition identified by
124 -- the index <anidex>.
128 Dump(me ; astream : in out OStream from Standard)
132 ---Purpose: Useful for debugging.
138 thefilename : HAsciiString from TCollection;
139 thetime : Time from Standard;
140 thesequenceofmethoddefinitions : SequenceOfMethodDefinitions from Dynamic;
142 end MethodDefinitionsDictionary;