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 <StepElement_VolumeElementPurposeMember.ixx>
19 #include <TCollection_HAsciiString.hxx>
21 static Standard_CString EVEP = "ENUMERATED_VOLUME_ELEMENT_PURPOSE";
22 static Standard_CString ADEP = "APPLICATION_DEFINED_ELEMENT_PURPOSE";
25 //=======================================================================
26 //function : StepElement_VolumeElementPurposeMember
28 //=======================================================================
30 StepElement_VolumeElementPurposeMember::StepElement_VolumeElementPurposeMember () : mycase(0)
34 //=======================================================================
37 //=======================================================================
39 Standard_Boolean StepElement_VolumeElementPurposeMember::HasName() const
44 //=======================================================================
47 //=======================================================================
49 Standard_CString StepElement_VolumeElementPurposeMember::Name() const
59 //=======================================================================
60 //function : CompareNames
62 //=======================================================================
64 static Standard_Integer CompareNames(const Standard_CString name,Standard_Integer &/*numen*/)
66 Standard_Integer thecase =0;
67 if (!name || name[0] == '\0') thecase = 0;
68 else if(!strcmp (name,EVEP)) {
71 else if(!strcmp (name,ADEP)) {
77 //=======================================================================
80 //=======================================================================
82 Standard_Boolean StepElement_VolumeElementPurposeMember::SetName(const Standard_CString name)
84 Standard_Integer numit =0;
85 mycase = CompareNames(name,numit);
86 if(numit) SetInteger(numit);
90 //=======================================================================
93 //=======================================================================
95 Standard_Boolean StepElement_VolumeElementPurposeMember::Matches(const Standard_CString name) const
97 Standard_Integer numit =0;
98 Standard_Integer thecase = CompareNames(name,numit);
99 return (mycase==thecase);