b311480e |
1 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
2 | // |
3 | // The content of this file is subject to the Open CASCADE Technology Public |
4 | // License Version 6.5 (the "License"). You may not use the content of this file |
5 | // except in compliance with the License. Please obtain a copy of the License |
6 | // at http://www.opencascade.org and read it completely before using this file. |
7 | // |
8 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
9 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
10 | // |
11 | // The Original Code and all software distributed under the License is |
12 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
13 | // Initial Developer hereby disclaims all such warranties, including without |
14 | // limitation, any warranties of merchantability, fitness for a particular |
15 | // purpose or non-infringement. Please see the License for the specific terms |
16 | // and conditions governing the rights and limitations under the License. |
17 | |
7fd59977 |
18 | #include <StepData_SelectNamed.ixx> |
19 | |
20 | // Definitions reprises de Field : |
21 | #define KindInteger 1 |
22 | #define KindBoolean 2 |
23 | #define KindLogical 3 |
24 | #define KindEnum 4 |
25 | #define KindReal 5 |
26 | #define KindString 6 |
27 | |
b311480e |
28 | StepData_SelectNamed::StepData_SelectNamed () |
7fd59977 |
29 | { theval.Clear(); thename.Clear(); } |
30 | |
31 | |
32 | Standard_Boolean StepData_SelectNamed::HasName () const |
33 | { return (thename.Length() > 0); } |
34 | |
35 | Standard_CString StepData_SelectNamed::Name () const |
36 | { return thename.ToCString(); } |
37 | |
38 | Standard_Boolean StepData_SelectNamed::SetName (const Standard_CString name) |
39 | { thename.Clear(); thename.AssignCat (name); return Standard_True; } |
40 | |
41 | const StepData_Field& StepData_SelectNamed::Field () const |
42 | { return theval; } |
43 | |
44 | StepData_Field& StepData_SelectNamed::CField () |
45 | { return theval; } |
46 | |
47 | |
48 | Standard_Integer StepData_SelectNamed::Kind () const |
49 | { return theval.Kind(); } |
50 | |
51 | void StepData_SelectNamed::SetKind (const Standard_Integer kind) |
52 | { theval.Clear (kind); } |
53 | |
54 | Standard_Integer StepData_SelectNamed::Int () const |
55 | { return theval.Int(); } |
56 | |
57 | void StepData_SelectNamed::SetInt (const Standard_Integer val) |
58 | { theval.SetInt (val); } |
59 | |
60 | Standard_Real StepData_SelectNamed::Real () const |
61 | { return theval.Real(); } |
62 | |
63 | void StepData_SelectNamed::SetReal (const Standard_Real val) |
64 | { theval.SetReal (val); } |
65 | |
66 | Standard_CString StepData_SelectNamed::String () const |
67 | { return theval.String(); } |
68 | |
69 | void StepData_SelectNamed::SetString (const Standard_CString val) |
70 | { theval.SetString (val); } |