0026715: Problems in reading STEP short names in complex entities
[occt.git] / src / StepData / StepData_SelectNamed.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
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
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.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14
15 #include <Standard_Type.hxx>
16 #include <StepData_Field.hxx>
17 #include <StepData_SelectNamed.hxx>
18
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
27 StepData_SelectNamed::StepData_SelectNamed  ()
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);  }