1 // Created on: 2002-12-10
2 // Created by: data exchange team
3 // Copyright (c) 2002-2014 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 // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0
18 #include <Standard_Type.hxx>
19 #include <StepElement_CurveElementFreedomMember.hxx>
20 #include <TCollection_HAsciiString.hxx>
22 IMPLEMENT_STANDARD_RTTIEXT(StepElement_CurveElementFreedomMember,StepData_SelectNamed)
24 static Standard_CString ECEF = "ENUMERATED_CURVE_ELEMENT_FREEDOM";
25 static Standard_CString ADDF = "APPLICATION_DEFINED_DEGREE_OF_FREEDOM";
27 //=======================================================================
28 //function : StepElement_CurveElementFreedomMember
30 //=======================================================================
32 StepElement_CurveElementFreedomMember::StepElement_CurveElementFreedomMember () : mycase(0)
36 //=======================================================================
39 //=======================================================================
41 Standard_Boolean StepElement_CurveElementFreedomMember::HasName() const
46 //=======================================================================
49 //=======================================================================
51 Standard_CString StepElement_CurveElementFreedomMember::Name() const
61 //=======================================================================
62 //function : CompareNames
64 //=======================================================================
66 static Standard_Integer CompareNames(const Standard_CString name,Standard_Integer &/*numen*/)
68 Standard_Integer thecase =0;
69 if (!name || name[0] == '\0') thecase = 0;
71 else if(!strcmp (name,ECEF)){
74 else if(!strcmp (name,ADDF)){
80 //=======================================================================
83 //=======================================================================
85 Standard_Boolean StepElement_CurveElementFreedomMember::SetName(const Standard_CString name)
87 Standard_Integer numit =0;
88 mycase = CompareNames(name,numit);
89 if(numit) SetInteger(numit);
93 //=======================================================================
96 //=======================================================================
98 Standard_Boolean StepElement_CurveElementFreedomMember::Matches(const Standard_CString name) const
100 Standard_Integer numit =0;
101 Standard_Integer thecase = CompareNames(name,numit);
102 return (mycase==thecase);