0030380: Exception while reading Step-file
[occt.git] / src / StepData / StepData_SelectNamed.cxx
CommitLineData
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
15#include <Standard_Type.hxx>
16#include <StepData_Field.hxx>
17#include <StepData_SelectNamed.hxx>
7fd59977 18
92efcf78 19IMPLEMENT_STANDARD_RTTIEXT(StepData_SelectNamed,StepData_SelectMember)
20
7fd59977 21// Definitions reprises de Field :
22#define KindInteger 1
23#define KindBoolean 2
24#define KindLogical 3
25#define KindEnum 4
26#define KindReal 5
27#define KindString 6
28
b311480e 29StepData_SelectNamed::StepData_SelectNamed ()
7fd59977 30 { theval.Clear(); thename.Clear(); }
31
32
33 Standard_Boolean StepData_SelectNamed::HasName () const
34 { return (thename.Length() > 0); }
35
36 Standard_CString StepData_SelectNamed::Name () const
37 { return thename.ToCString(); }
38
39 Standard_Boolean StepData_SelectNamed::SetName (const Standard_CString name)
40 { thename.Clear(); thename.AssignCat (name); return Standard_True; }
41
42 const StepData_Field& StepData_SelectNamed::Field () const
43 { return theval; }
44
45 StepData_Field& StepData_SelectNamed::CField ()
46 { return theval; }
47
48
49 Standard_Integer StepData_SelectNamed::Kind () const
50 { return theval.Kind(); }
51
52 void StepData_SelectNamed::SetKind (const Standard_Integer kind)
53 { theval.Clear (kind); }
54
55 Standard_Integer StepData_SelectNamed::Int () const
56 { return theval.Int(); }
57
58 void StepData_SelectNamed::SetInt (const Standard_Integer val)
59 { theval.SetInt (val); }
60
61 Standard_Real StepData_SelectNamed::Real () const
62 { return theval.Real(); }
63
64 void StepData_SelectNamed::SetReal (const Standard_Real val)
65 { theval.SetReal (val); }
66
67 Standard_CString StepData_SelectNamed::String () const
68 { return theval.String(); }
69
70 void StepData_SelectNamed::SetString (const Standard_CString val)
71 { theval.SetString (val); }