b311480e |
1 | -- Created on: 1998-07-22 |
2 | -- Created by: Christian CAILLET |
3 | -- Copyright (c) 1998-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class Vars from XSControl inherits TShared from MMgt |
18 | |
19 | ---Purpose : Defines a receptacle for externally defined variables, each |
20 | -- one has a name |
21 | -- |
22 | -- I.E. a WorkSession for XSTEP is generally used inside a |
23 | -- context, which brings variables, especially shapes and |
24 | -- geometries. For instance DRAW or an application engine |
25 | -- |
26 | -- This class provides a common form for this. It also provides |
27 | -- a default implementation (locally recorded variables in a |
28 | -- dictionary), but which is aimed to be redefined |
29 | |
30 | uses CString, Transient, DictionaryOfTransient, |
31 | Pnt from gp, Pnt2d from gp, |
32 | Geometry from Geom, Curve from Geom, Curve from Geom2d, Surface from Geom, |
33 | Shape from TopoDS |
34 | |
35 | is |
36 | |
6e33d3ce |
37 | Create returns Vars; |
7fd59977 |
38 | |
39 | Set (me : mutable; name : CString; val : Transient) is virtual; |
40 | |
41 | Get (me; name : in out CString) returns Transient is virtual; |
42 | |
43 | |
44 | GetGeom (me; name : in out CString) returns Geometry is virtual; |
45 | |
46 | GetCurve2d (me; name : in out CString) returns Curve from Geom2d is virtual; |
47 | |
48 | GetCurve (me; name : in out CString) returns Curve from Geom is virtual; |
49 | |
50 | GetSurface (me; name : in out CString) returns Surface from Geom is virtual; |
51 | |
52 | SetPoint (me : mutable; name : CString; val : Pnt from gp) is virtual; |
53 | |
54 | SetPoint2d (me : mutable; name : CString; val : Pnt2d from gp) is virtual; |
55 | |
56 | GetPoint (me; name : in out CString; pnt : out Pnt from gp) returns Boolean is virtual; |
57 | |
58 | GetPoint2d (me; name : in out CString; pnt : out Pnt2d from gp) returns Boolean is virtual; |
59 | |
60 | |
61 | SetShape (me : mutable; name : CString; val : Shape from TopoDS) is virtual; |
62 | |
63 | GetShape (me; name : in out CString) returns Shape from TopoDS is virtual; |
64 | |
65 | fields |
66 | |
67 | thevars : DictionaryOfTransient; |
68 | |
69 | end Vars; |