0023483: Use appropriate type for handling integer time
[occt.git] / src / Dynamic / Dynamic_MethodDefinitionsDictionary.cdl
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
5 --
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.
10 --
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.
13 --
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.
20
21
22
23 deferred class MethodDefinitionsDictionary from Dynamic
24
25 inherits
26
27     Transient
28     
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
38         --          StringParameter.
39
40 uses
41
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,
49     Method                      from Dynamic
50
51 is
52
53     Initialize;
54     
55     ---Level: Internal 
56     
57     ---Purpose: Deferred constructor of the class.
58     
59     Creates(me : mutable ; afilename : CString from Standard)
60     
61     ---Level: Internal 
62     
63     ---Purpose: Starting with   a file named  <afilename>,  fills  the
64     --          dictionary with all the wishes definitions.
65     
66     is static;
67     
68     Definition(me : mutable ; adefinition : Method from Dynamic) returns Boolean from Standard
69     
70     ---Level: Advanced 
71     
72     ---Purpose: This method sets  the new definition  <adefinition> in
73     --          the dictionary. It   returns true if the operation  is
74     --          successful, false otherwise.
75     
76     is static;
77     
78     Switch(me ; aname , atype , avalue : CString from Standard)
79     
80     ---Level: Internal 
81     
82     ---Purpose: This virtual method allows the user to add recognition
83     --          of its  own  parameters when reading  the file to fill
84     --          the dictionary.
85     
86     returns Parameter from Dynamic;
87     
88     Definition(me ; atype       : CString from Standard
89                   ; adefinition : out Method from Dynamic) returns Boolean from Standard
90         
91     ---Level: Public 
92     
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.
97     
98     is static;
99     
100     UpToDate(me) returns Boolean from Standard
101     
102     ---Level: Advanced 
103     
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.
107     
108     is static;
109     
110     NumberOfDefinitions(me) returns Integer from Standard
111     
112     ---Level: Public 
113     
114     ---Purpose: Returns    the number  of  definitions  stored  in the
115     --          dictionary.
116     
117     is static;
118     
119     Definition(me ; anindex : Integer from Standard) returns any Method from Dynamic
120     
121     ---Level: Public 
122     
123     ---Purpose: Returns a  reference on the  definition identified  by
124     --          the index <anidex>.
125     
126     is static;
127     
128     Dump(me ; astream : in out OStream from Standard)
129     
130     ---Level: Internal 
131     
132     ---Purpose: Useful for debugging.
133     
134     is static;
135
136 fields
137
138     thefilename                    : HAsciiString                from TCollection;
139     thetime                        : Time                        from Standard;
140     thesequenceofmethoddefinitions : SequenceOfMethodDefinitions from Dynamic;
141
142 end MethodDefinitionsDictionary;