0024830: Remove redundant keyword 'mutable' in CDL declarations
[occt.git] / src / Interface / Interface_ParamSet.cdl
1 -- Created on: 1992-10-29
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1992-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 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.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class ParamSet  from Interface  inherits TShared
18
19         ---Purpose : Defines an ordered set of FileParameters, in a way to be
20         --           efficient as in memory requirement or in speed
21
22 uses CString, ParamList, FileParameter, ParamType
23
24 raises OutOfRange
25
26 is
27
28     Create (nres : Integer; nst : Integer = 1)  returns ParamSet;
29     ---Purpose : Creates an empty ParamSet, beginning at number "nst" and of
30     --           initial reservation "nres" : the "nres" first parameters
31     --           which follow "ndeb" (included) will be put in an Array
32     --           (a ParamList). The remainders are set in Next(s) ParamSet(s)
33
34     Append (me : mutable; val : CString; lnval : Integer; typ : ParamType;
35             nument : Integer)
36         returns Integer  is static;
37     ---Purpose : Adds a parameter defined as its Value (CString and length) and
38     --           Type. Optionnal EntityNumber (for FileReaderData) can be given
39     --           Allows a better memory management than Appending a
40     --           complete FileParameter
41     --           If <lnval> < 0, <val> is assumed to be managed elsewhere : its
42     --           adress is stored as such. Else, <val> is copied in a locally
43     --           (quickly) managed Page of Characters
44     --           Returns new count of recorded Parameters
45
46     Append (me : mutable; FP : FileParameter)  returns Integer  is static;
47     ---Purpose : Adds a parameter at the end of the ParamSet (transparent
48     --           about reservation and "Next")
49     --           Returns new count of recorded Parameters
50
51     NbParams (me) returns Integer  is static;
52     ---Purpose : Returns the total count of parameters (including nexts)
53
54     Param (me; num : Integer) returns FileParameter
55     ---Purpose : Returns a parameter identified by its number
56         raises OutOfRange  is static;
57     --           Error if num < 1 or num > NbParams
58     ---C++ : return const &
59
60     ChangeParam (me : mutable; num : Integer) returns FileParameter
61     ---Purpose : Same as above, but in order to be modified on place
62         raises OutOfRange  is static;
63     --           Error if num < 1 or num > NbParams
64     ---C++ : return &
65
66     SetParam (me : mutable; num : Integer; FP : FileParameter)
67          raises OutOfRange  is static;
68     ---Purpose : Changes a parameter identified by its number
69
70     Params (me; num,nb : Integer) returns ParamList
71         raises OutOfRange is static;
72     ---Purpose : Builds and returns the sub-list correspinding to parameters,
73     --           from "num" included, with count "nb"
74     --           If <num> and <nb> are zero, returns the whole list
75
76     Destroy (me : mutable)  is static;
77     ---Purpose : Destructor (waiting for transparent memory management)
78     ---C++ : alias ~
79
80 fields
81
82     theval   : PCharacter;
83     thelnval : Integer;
84     thelnres : Integer;
85     thenbpar : Integer;
86     themxpar : Integer;
87     thelist  : ParamList;
88     thenext  : ParamSet;
89
90 end ParamSet;