|
||||
File indexing completed on 2025-01-18 10:03:54
0001 // Created on: 1992-11-30 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1992-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 _IFSelect_IntParam_HeaderFile 0018 #define _IFSelect_IntParam_HeaderFile 0019 0020 #include <Standard.hxx> 0021 0022 #include <Standard_Integer.hxx> 0023 #include <TCollection_AsciiString.hxx> 0024 #include <NCollection_DefineAlloc.hxx> 0025 #include <Standard_Transient.hxx> 0026 0027 class IFSelect_IntParam; 0028 DEFINE_STANDARD_HANDLE(IFSelect_IntParam, Standard_Transient) 0029 0030 //! This class simply allows to access an Integer value through a 0031 //! Handle, as a String can be (by using HString). 0032 //! Hence, this value can be accessed : read and modified, without 0033 //! passing through the specific object which detains it. Thus, 0034 //! parameters of a Selection or a Dispatch (according its type) 0035 //! can be controlled directly from the ShareOut which contains them 0036 //! 0037 //! Additionally, an IntParam can be bound to a Static. 0038 //! Remember that for a String, binding is immediate, because the 0039 //! string value of a Static is a HAsciiString, it then suffices 0040 //! to get its Handle. 0041 //! For an Integer, an IntParam can designate (by its name) a 0042 //! Static : each time its value is required or set, the Static 0043 //! is aknowledged 0044 class IFSelect_IntParam : public Standard_Transient 0045 { 0046 0047 public: 0048 0049 //! Creates an IntParam. Initial value is set to zer 0050 Standard_EXPORT IFSelect_IntParam(); 0051 0052 //! Commands this IntParam to be bound to a Static 0053 //! Hence, Value will return the value if this Static if it is set 0054 //! Else, Value works on the locally stored value 0055 //! SetValue also will set the value of the Static 0056 //! This works only for a present static of type integer or enum 0057 //! Else, it is ignored 0058 //! 0059 //! If <statname> is empty, disconnects the IntParam from Static 0060 Standard_EXPORT void SetStaticName (const Standard_CString statname); 0061 0062 //! Returns the name of static parameter to which this IntParam 0063 //! is bound, empty if none 0064 Standard_EXPORT Standard_CString StaticName() const; 0065 0066 //! Reads Integer Value of the IntParam. If a StaticName is 0067 //! defined and the Static is set, looks in priority the value 0068 //! of the static 0069 Standard_EXPORT Standard_Integer Value() const; 0070 0071 //! Sets a new Integer Value for the IntParam. If a StaticName is 0072 //! defined and the Static is set, also sets the value of the static 0073 Standard_EXPORT void SetValue (const Standard_Integer val); 0074 0075 0076 DEFINE_STANDARD_RTTIEXT(IFSelect_IntParam,Standard_Transient) 0077 0078 private: 0079 0080 Standard_Integer theval; 0081 TCollection_AsciiString thestn; 0082 0083 }; 0084 0085 #endif // _IFSelect_IntParam_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |