0024830: Remove redundant keyword 'mutable' in CDL declarations
[occt.git] / src / Interface / Interface_TypedValue.cdl
1 -- Created on: 1998-02-23
2 -- Created by: Christian CAILLET
3 -- Copyright (c) 1998-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 TypedValue  from Interface    inherits TypedValue  from MoniTool
18
19     ---Purpose : Now strictly equivalent to TypedValue from MoniTool,
20     --           except for ParamType which remains for compatibility reasons
21     --           
22     --           This class allows to dynamically manage .. typed values, i.e.
23     --           values which have an alphanumeric expression, but with
24     --           controls. Such as "must be an Integer" or "Enumerative Text"
25     --           etc
26     --           
27     --           Hence, a TypedValue brings a specification (type + constraints
28     --           if any) and a value. Its basic form is a string, it can be
29     --           specified as integer or real or enumerative string, then
30     --           queried as such.
31     --           Its string content, which is a Handle(HAsciiString) can be
32     --           shared by other data structures, hence gives a direct on line
33     --           access to its value.
34
35 uses CString, Type from Standard,
36      AsciiString from TCollection, HAsciiString from TCollection,
37      HSequenceOfAsciiString  from TColStd, HArray1OfAsciiString  from TColStd,
38      HSequenceOfHAsciiString from TColStd,
39      DictionaryOfInteger from Dico,
40      ParamType from Interface , ValueType from MoniTool,
41      ValueSatisfies from Interface, ValueInterpret from Interface
42
43 raises InterfaceError
44
45 is
46
47     Create (name : CString;
48             type : ParamType from Interface = Interface_ParamText;
49             init : CString = "")  returns TypedValue;
50     ---Purpose : Creates a TypedValue, with a name
51     --           
52     --           type gives the type of the parameter, default is free text
53     --           Also available : Integer, Real, Enum, Entity (i.e. Object)
54     --           More precise specifications, titles, can be given to the
55     --           TypedValue once created
56     --           
57     --           init gives an initial value. If it is not given, the
58     --           TypedValue begins as "not set", its value is empty
59
60     Type   (me) returns ParamType from Interface;
61     ---Purpose : Returns the type
62     --           I.E. calls ValueType then makes correspondance between
63     --             ParamType from Interface (which remains for compatibility
64     --              reasons) and ValueType from MoniTool
65
66     ParamTypeToValueType (myclass; typ : ParamType from Interface)
67         returns ValueType from MoniTool;
68     ---Purpose : Correspondance ParamType from Interface  to
69     --               ValueType from MoniTool
70
71     ValueTypeToParamType (myclass; typ : ValueType from MoniTool)
72         returns ParamType from Interface;
73     ---Purpose : Correspondance ParamType from Interface  to
74     --               ValueType from MoniTool
75
76 fields
77
78     thename   : AsciiString;
79     thedef    : AsciiString;
80     thelabel  : AsciiString;
81     theotyp   : Type from Standard;  -- for object
82     theunidef : AsciiString;
83     theenums  : HArray1OfAsciiString    from TColStd;
84     theeadds  : DictionaryOfInteger;
85     thesatisn : AsciiString;
86     thehval   : HAsciiString from TCollection;
87     theoval   : Transient;
88
89 end Static;