Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-26 09:04:47

0001 // Created on: 1996-12-16
0002 // Created by: Christian CAILLET
0003 // Copyright (c) 1996-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _StepData_SelectMember_HeaderFile
0018 #define _StepData_SelectMember_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Standard_Transient.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <Interface_ParamType.hxx>
0026 #include <StepData_Logical.hxx>
0027 
0028 //! The general form for a Select Member. A Select Member can,
0029 //! either define a value of a basic type (such as an integer)
0030 //! with an additional information : a name or list of names
0031 //! which precise the meaning of this value
0032 //! or be an alternate value in a select, which also accepts an
0033 //! entity (in this case, the name is not mandatory)
0034 //!
0035 //! Several sub-types of SelectMember are defined for integer and
0036 //! real value, plus an "universal" one for any, and one more to
0037 //! describe a select with several names
0038 //!
0039 //! It is also possible to define a specific subtype by redefining
0040 //! virtual method, then give a better control
0041 //!
0042 //! Remark : this class itself could be deferred, because at least
0043 //! one of its virtual methods must be redefined to be usable
0044 class StepData_SelectMember : public Standard_Transient
0045 {
0046 
0047 public:
0048   Standard_EXPORT StepData_SelectMember();
0049 
0050   //! Tells if a SelectMember has a name. Default is False
0051   Standard_EXPORT virtual bool HasName() const;
0052 
0053   //! Returns the name of a SelectMember. Default is empty
0054   Standard_EXPORT virtual const char* Name() const;
0055 
0056   //! Sets the name of a SelectMember, returns True if done, False
0057   //! if no name is allowed
0058   //! Default does nothing and returns False
0059   Standard_EXPORT virtual bool SetName(const char* const name);
0060 
0061   //! Tells if the name of a SelectMember matches a given one
0062   //! By default, compares the strings, can be redefined (optimised)
0063   Standard_EXPORT virtual bool Matches(const char* const name) const;
0064 
0065   Standard_EXPORT virtual int Kind() const;
0066 
0067   Standard_EXPORT virtual void SetKind(const int kind);
0068 
0069   //! Returns the Kind of the SelectMember, under the form of an
0070   //! enum ParamType
0071   Standard_EXPORT Interface_ParamType ParamType() const;
0072 
0073   //! This internal method gives access to a value implemented by an
0074   //! Integer (to read it)
0075   Standard_EXPORT virtual int Int() const;
0076 
0077   //! This internal method gives access to a value implemented by an
0078   //! Integer (to set it)
0079   Standard_EXPORT virtual void SetInt(const int val);
0080 
0081   //! Gets the value as an Integer
0082   Standard_EXPORT int Integer() const;
0083 
0084   Standard_EXPORT void SetInteger(const int val);
0085 
0086   Standard_EXPORT bool Boolean() const;
0087 
0088   Standard_EXPORT void SetBoolean(const bool val);
0089 
0090   Standard_EXPORT StepData_Logical Logical() const;
0091 
0092   Standard_EXPORT void SetLogical(const StepData_Logical val);
0093 
0094   Standard_EXPORT virtual double Real() const;
0095 
0096   Standard_EXPORT virtual void SetReal(const double val);
0097 
0098   Standard_EXPORT virtual const char* String() const;
0099 
0100   Standard_EXPORT virtual void SetString(const char* const val);
0101 
0102   Standard_EXPORT int Enum() const;
0103 
0104   Standard_EXPORT virtual const char* EnumText() const;
0105 
0106   Standard_EXPORT void SetEnum(const int val, const char* const text = "");
0107 
0108   Standard_EXPORT virtual void SetEnumText(const int val, const char* const text);
0109 
0110   DEFINE_STANDARD_RTTIEXT(StepData_SelectMember, Standard_Transient)
0111 };
0112 
0113 #endif // _StepData_SelectMember_HeaderFile