blob: 297ca5627abdda855554fb82c94f52604bc5a21a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
-- File: Dynamic_EnumerationParameter.cdl
-- Created: Thu Feb 3 14:44:37 1994
-- Author: Gilles DEBARBOUILLE
-- <gde@metrox>
---Copyright: Matra Datavision 1994
generic class EnumerationParameter from Dynamic (Enum as any)
inherits
Parameter from Dynamic
---Purpose: This generic class defines a parameter with a given
-- enumeration. For correct use an instanciation of this
-- class, the Convert method must be defined. This
-- method is automaticaly called by the constructor which
-- takes a CString as value for the enumeration. The
-- prototype of the Convert method must be described as
-- follows :
--
-- void Convert(const Standard_CString,Enum);
--
-- The prototype and the body of this method, can be
-- written in the file <mypackage.cxx> where the
-- enumeration is described. No declaration of the
-- Convert method in any .cdl file is necessary.
uses
CString from Standard,
OStream from Standard
is
Create(aparameter : CString from Standard)
---Level: Public
---Purpose: Creates an EnumerationParameter of <aparameter> as
-- name.
returns mutable EnumerationParameter from Dynamic;
Create(aparameter : CString from Standard; avalue : Enum)
---Level: Public
---Purpose: Creates an EnumerationParameter of <aparameter> as
-- name and <avalue> as value.
returns mutable EnumerationParameter from Dynamic;
Create(aparameter , avalue : CString from Standard)
---Level: Public
---Purpose: Creates an EnumerationParameter of <aparameter> as
-- name and <avalue> as value. The user has to define a
-- Convert method to translate the string <avalue> in an
-- enumeration term.
returns mutable EnumerationParameter from Dynamic;
Value(me) returns Enum
---Level: Public
---Purpose: Returns the enumeration value <thevalue>.
is static;
Value (me : mutable ; avalue : Enum)
---Level: Public
---Purpose: Sets the field <thevalue> with the enumeration value <avalue>
is static;
Dump(me ; astream : in out OStream from Standard)
---Level: Internal
---Purpose: useful for debugging.
is redefined;
fields
thevalue : Enum;
end EnumerationParameter;
|