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