0027047: STEP -- eliminate useless polymorhic methods Init()
[occt.git] / src / StepDimTol / StepDimTol_SimpleDatumReferenceModifierMember.cxx
CommitLineData
28a73c1f 1// Created on: 2015-07-16
2// Created by: Irina KRYLOVA
3// Copyright (c) 2015 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
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.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#include <StepDimTol_SimpleDatumReferenceModifierMember.hxx>
17#include <StepData_EnumTool.hxx>
18#include <TCollection_AsciiString.hxx>
19
92efcf78 20IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_SimpleDatumReferenceModifierMember,StepData_SelectInt)
21
28a73c1f 22static StepData_EnumTool tool
23 (".ANY_CROSS_SECTION.",
24 ".ANY_LONGITUDINAL_SECTION.",
25 ".BASIC.",
26 ".CONTACTING_FEATURE.",
27 ".DEGREE_OF_FREEDOM_CONSTRAINT_U.",
28 ".DEGREE_OF_FREEDOM_CONSTRAINT_V.",
29 ".DEGREE_OF_FREEDOM_CONSTRAINT_W.",
30 ".DEGREE_OF_FREEDOM_CONSTRAINT_X.",
31 ".DEGREE_OF_FREEDOM_CONSTRAINT_Y.",
32 ".DEGREE_OF_FREEDOM_CONSTRAINT_Z.",
33 ".DISTANCE_VARIABLE.",
34 ".FREE_STATE.",
35 ".LEAST_MATERIAL_REQUIREMENT.",
36 ".LINE.",
37 ".MAJOR_DIAMETER.",
38 ".MAXIMUM_MATERIAL_REQUIREMENT.",
39 ".MINOR_DIAMETER.",
40 ".ORIENTATION.",
41 ".PITCH_DIAMETER.",
42 ".PLANE.",
43 ".POINT.",
44 ".TRANSLATION.");
45
46//=======================================================================
47//function : StepDimTol_SimpleDatumReferenceModifierMember
48//purpose :
49//=======================================================================
50
51StepDimTol_SimpleDatumReferenceModifierMember::StepDimTol_SimpleDatumReferenceModifierMember () { }
52
53//=======================================================================
54//function : EnumText
55//purpose :
56//=======================================================================
57
58Standard_CString StepDimTol_SimpleDatumReferenceModifierMember::EnumText () const
59 { return tool.Text(Int()).ToCString(); }
60
61//=======================================================================
62//function : SetEnumText
63//purpose :
64//=======================================================================
65
66void StepDimTol_SimpleDatumReferenceModifierMember::SetEnumText (const Standard_Integer /*theValue*/,
67 const Standard_CString theText)
68{
69 Standard_Integer aVal = tool.Value (theText);
70 if (aVal >= 0) SetInt (aVal);
71}
72
73//=======================================================================
74//function : SetValue
75//purpose :
76//=======================================================================
77
78void StepDimTol_SimpleDatumReferenceModifierMember::SetValue (const StepDimTol_SimpleDatumReferenceModifier theValue)
79{
80 SetInt ( Standard_Integer (theValue) );
81}
82
83//=======================================================================
84//function : Value
85//purpose :
86//=======================================================================
87
88StepDimTol_SimpleDatumReferenceModifier StepDimTol_SimpleDatumReferenceModifierMember::Value () const
89{
90 return StepDimTol_SimpleDatumReferenceModifier (Int());
91}
92
93