1 // Created on: 2015-07-16
2 // Created by: Irina KRYLOVA
3 // Copyright (c) 2015 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #include <StepVisual_NullStyleMember.hxx>
17 #include <StepData_EnumTool.hxx>
18 #include <TCollection_AsciiString.hxx>
20 IMPLEMENT_STANDARD_RTTIEXT(StepVisual_NullStyleMember,StepData_SelectInt)
22 static StepData_EnumTool tool
25 //=======================================================================
26 //function : StepVisual_NullStyleMember
28 //=======================================================================
30 StepVisual_NullStyleMember::StepVisual_NullStyleMember () { }
32 //=======================================================================
35 //=======================================================================
37 Standard_CString StepVisual_NullStyleMember::EnumText () const
39 return tool.Text(Int()).ToCString();
42 //=======================================================================
43 //function : SetEnumText
45 //=======================================================================
47 void StepVisual_NullStyleMember::SetEnumText (const Standard_Integer /*theValue*/,
48 const Standard_CString theText)
50 Standard_Integer aVal = tool.Value (theText);
51 if (aVal >= 0) SetInt (aVal);
54 //=======================================================================
57 //=======================================================================
59 void StepVisual_NullStyleMember::SetValue (const StepVisual_NullStyle theValue)
61 SetInt ( Standard_Integer (theValue) );
64 //=======================================================================
67 //=======================================================================
69 StepVisual_NullStyle StepVisual_NullStyleMember::Value () const
71 return StepVisual_NullStyle (Int());