973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
42cf5bc1 |
14 | |
42cf5bc1 |
15 | #include <StepData_SelectNamed.hxx> |
7fd59977 |
16 | |
92efcf78 |
17 | IMPLEMENT_STANDARD_RTTIEXT(StepData_SelectNamed,StepData_SelectMember) |
18 | |
7fd59977 |
19 | // Definitions reprises de Field : |
20 | #define KindInteger 1 |
21 | #define KindBoolean 2 |
22 | #define KindLogical 3 |
23 | #define KindEnum 4 |
24 | #define KindReal 5 |
25 | #define KindString 6 |
26 | |
b311480e |
27 | StepData_SelectNamed::StepData_SelectNamed () |
7fd59977 |
28 | { theval.Clear(); thename.Clear(); } |
29 | |
30 | |
31 | Standard_Boolean StepData_SelectNamed::HasName () const |
32 | { return (thename.Length() > 0); } |
33 | |
34 | Standard_CString StepData_SelectNamed::Name () const |
35 | { return thename.ToCString(); } |
36 | |
37 | Standard_Boolean StepData_SelectNamed::SetName (const Standard_CString name) |
38 | { thename.Clear(); thename.AssignCat (name); return Standard_True; } |
39 | |
40 | const StepData_Field& StepData_SelectNamed::Field () const |
41 | { return theval; } |
42 | |
43 | StepData_Field& StepData_SelectNamed::CField () |
44 | { return theval; } |
45 | |
46 | |
47 | Standard_Integer StepData_SelectNamed::Kind () const |
48 | { return theval.Kind(); } |
49 | |
50 | void StepData_SelectNamed::SetKind (const Standard_Integer kind) |
51 | { theval.Clear (kind); } |
52 | |
53 | Standard_Integer StepData_SelectNamed::Int () const |
54 | { return theval.Int(); } |
55 | |
56 | void StepData_SelectNamed::SetInt (const Standard_Integer val) |
57 | { theval.SetInt (val); } |
58 | |
59 | Standard_Real StepData_SelectNamed::Real () const |
60 | { return theval.Real(); } |
61 | |
62 | void StepData_SelectNamed::SetReal (const Standard_Real val) |
63 | { theval.SetReal (val); } |
64 | |
65 | Standard_CString StepData_SelectNamed::String () const |
66 | { return theval.String(); } |
67 | |
68 | void StepData_SelectNamed::SetString (const Standard_CString val) |
69 | { theval.SetString (val); } |