Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:06

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 
0029 class StepData_SelectMember;
0030 DEFINE_STANDARD_HANDLE(StepData_SelectMember, Standard_Transient)
0031 
0032 //! The general form for a Select Member. A Select Member can,
0033 //! either define a value of a basic type (such as an integer)
0034 //! with an additional information : a name or list of names
0035 //! which precise the meaning of this value
0036 //! or be an alternate value in a select, which also accepts an
0037 //! entity (in this case, the name is not mandatory)
0038 //!
0039 //! Several sub-types of SelectMember are defined for integer and
0040 //! real value, plus an "universal" one for any, and one more to
0041 //! describe a select with several names
0042 //!
0043 //! It is also possible to define a specific subtype by redefining
0044 //! virtual method, then give a better control
0045 //!
0046 //! Remark : this class itself could be deferred, because at least
0047 //! one of its virtual methods must be redefined to be usable
0048 class StepData_SelectMember : public Standard_Transient
0049 {
0050 
0051 public:
0052 
0053   
0054   Standard_EXPORT StepData_SelectMember();
0055   
0056   //! Tells if a SelectMember has a name. Default is False
0057   Standard_EXPORT virtual Standard_Boolean HasName() const;
0058   
0059   //! Returns the name of a SelectMember. Default is empty
0060   Standard_EXPORT virtual Standard_CString Name() const;
0061   
0062   //! Sets the name of a SelectMember, returns True if done, False
0063   //! if no name is allowed
0064   //! Default does nothing and returns False
0065   Standard_EXPORT virtual Standard_Boolean SetName (const Standard_CString name);
0066   
0067   //! Tells if the name of a SelectMember matches a given one
0068   //! By default, compares the strings, can be redefined (optimised)
0069   Standard_EXPORT virtual Standard_Boolean Matches (const Standard_CString name) const;
0070   
0071   Standard_EXPORT virtual Standard_Integer Kind() const;
0072   
0073   Standard_EXPORT virtual void SetKind (const Standard_Integer kind);
0074   
0075   //! Returns the Kind of the SelectMember, under the form of an
0076   //! enum ParamType
0077   Standard_EXPORT Interface_ParamType ParamType() const;
0078   
0079   //! This internal method gives access to a value implemented by an
0080   //! Integer (to read it)
0081   Standard_EXPORT virtual Standard_Integer Int() const;
0082   
0083   //! This internal method gives access to a value implemented by an
0084   //! Integer (to set it)
0085   Standard_EXPORT virtual void SetInt (const Standard_Integer val);
0086   
0087   //! Gets the value as an Integer
0088   Standard_EXPORT Standard_Integer Integer() const;
0089   
0090   Standard_EXPORT void SetInteger (const Standard_Integer val);
0091   
0092   Standard_EXPORT Standard_Boolean Boolean() const;
0093   
0094   Standard_EXPORT void SetBoolean (const Standard_Boolean val);
0095   
0096   Standard_EXPORT StepData_Logical Logical() const;
0097   
0098   Standard_EXPORT void SetLogical (const StepData_Logical val);
0099   
0100   Standard_EXPORT virtual Standard_Real Real() const;
0101   
0102   Standard_EXPORT virtual void SetReal (const Standard_Real val);
0103   
0104   Standard_EXPORT virtual Standard_CString String() const;
0105   
0106   Standard_EXPORT virtual void SetString (const Standard_CString val);
0107   
0108   Standard_EXPORT Standard_Integer Enum() const;
0109   
0110   Standard_EXPORT virtual Standard_CString EnumText() const;
0111   
0112   Standard_EXPORT void SetEnum (const Standard_Integer val, const Standard_CString text = "");
0113   
0114   Standard_EXPORT virtual void SetEnumText (const Standard_Integer val, const Standard_CString text);
0115 
0116 
0117 
0118 
0119   DEFINE_STANDARD_RTTIEXT(StepData_SelectMember,Standard_Transient)
0120 
0121 protected:
0122 
0123 
0124 
0125 
0126 private:
0127 
0128 
0129 
0130 
0131 };
0132 
0133 
0134 
0135 
0136 
0137 
0138 
0139 #endif // _StepData_SelectMember_HeaderFile