1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-06 18:26:22 +03:00
occt/src/StepElement/StepElement_SurfaceElementPurposeMember.cxx
omy 35e08fe886 0024057: Eliminate compiler warning C4100 in MSVC++ with warning level 4
Got rid of warning C4100: 'identifier' : unreferenced formal parameter
Got rid of compile errors
2013-07-18 13:09:32 +04:00

105 lines
3.5 KiB
C++
Executable File

// Created on: 2002-12-10
// Created by: data exchange team
// Copyright (c) 2002-2012 OPEN CASCADE SAS
//
// The content of this file is subject to the Open CASCADE Technology Public
// License Version 6.5 (the "License"). You may not use the content of this file
// except in compliance with the License. Please obtain a copy of the License
// at http://www.opencascade.org and read it completely before using this file.
//
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
//
// The Original Code and all software distributed under the License is
// distributed on an "AS IS" basis, without warranty of any kind, and the
// Initial Developer hereby disclaims all such warranties, including without
// limitation, any warranties of merchantability, fitness for a particular
// purpose or non-infringement. Please see the License for the specific terms
// and conditions governing the rights and limitations under the License.
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V2.0
#include <StepElement_SurfaceElementPurposeMember.ixx>
#include <TCollection_HAsciiString.hxx>
static Standard_CString ESEP = "ENUMERATED_SURFACE_ELEMENT_PURPOSE";
static Standard_CString ADEP = "APPLICATION_DEFINED_ELEMENT_PURPOSE";
//=======================================================================
//function : StepElement_SurfaceElementPurposeMember
//purpose :
//=======================================================================
StepElement_SurfaceElementPurposeMember::StepElement_SurfaceElementPurposeMember () : mycase(0)
{
}
//=======================================================================
//function : HasName
//purpose :
//=======================================================================
Standard_Boolean StepElement_SurfaceElementPurposeMember::HasName() const
{
return mycase >0;
}
//=======================================================================
//function : Name
//purpose :
//=======================================================================
Standard_CString StepElement_SurfaceElementPurposeMember::Name() const
{
switch(mycase) {
case 1 : return ESEP;
case 2 : return ADEP;
default : break;
}
return "";
}
//=======================================================================
//function : CompareNames
//purpose :
//=======================================================================
static Standard_Integer CompareNames(const Standard_CString name,Standard_Integer &/*numen*/)
{
Standard_Integer thecase =0;
if (!name || name[0] == '\0') thecase = 0;
else if(!strcmp (name,ESEP)) {
thecase = 1;
}
else if(!strcmp (name,ADEP)) {
thecase = 1;
}
return thecase;
}
//=======================================================================
//function : SetName
//purpose :
//=======================================================================
Standard_Boolean StepElement_SurfaceElementPurposeMember::SetName(const Standard_CString name)
{
Standard_Integer numit =0;
mycase = CompareNames(name,numit);
if(numit) SetInteger(numit);
return (mycase >0);
}
//=======================================================================
//function : Matches
//purpose :
//=======================================================================
Standard_Boolean StepElement_SurfaceElementPurposeMember::Matches(const Standard_CString name) const
{
Standard_Integer numit =0;
Standard_Integer thecase = CompareNames(name,numit);
return (mycase==thecase);
}