|
|
|||
File indexing completed on 2026-09-18 09:20:56
0001 // Created on: 1998-02-23 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1998-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 _Interface_TypedValue_HeaderFile 0018 #define _Interface_TypedValue_HeaderFile 0019 0020 #include <Standard.hxx> 0021 0022 #include <MoniTool_TypedValue.hxx> 0023 #include <Interface_ParamType.hxx> 0024 #include <MoniTool_ValueType.hxx> 0025 class TCollection_HAsciiString; 0026 0027 //! Now strictly equivalent to TypedValue from MoniTool, 0028 //! except for ParamType which remains for compatibility reasons 0029 //! 0030 //! This class allows to dynamically manage .. typed values, i.e. 0031 //! values which have an alphanumeric expression, but with 0032 //! controls. Such as "must be an Integer" or "Enumerative Text" 0033 //! etc 0034 //! 0035 //! Hence, a TypedValue brings a specification (type + constraints 0036 //! if any) and a value. Its basic form is a string, it can be 0037 //! specified as integer or real or enumerative string, then 0038 //! queried as such. 0039 //! Its string content, which is a occ::handle<HAsciiString> can be 0040 //! shared by other data structures, hence gives a direct on line 0041 //! access to its value. 0042 class Interface_TypedValue : public MoniTool_TypedValue 0043 { 0044 0045 public: 0046 //! Creates a TypedValue, with a name 0047 //! 0048 //! type gives the type of the parameter, default is free text 0049 //! Also available : Integer, Real, Enum, Entity (i.e. Object) 0050 //! More precise specifications, titles, can be given to the 0051 //! TypedValue once created 0052 //! 0053 //! init gives an initial value. If it is not given, the 0054 //! TypedValue begins as "not set", its value is empty 0055 Standard_EXPORT Interface_TypedValue(const char* const name, 0056 const Interface_ParamType type = Interface_ParamText, 0057 const char* const init = ""); 0058 0059 //! Returns the type 0060 //! I.E. calls ValueType then makes correspondence between 0061 //! ParamType from Interface (which remains for compatibility 0062 //! reasons) and ValueType from MoniTool 0063 Standard_EXPORT Interface_ParamType Type() const; 0064 0065 //! Correspondence ParamType from Interface to ValueType from MoniTool 0066 Standard_EXPORT static MoniTool_ValueType ParamTypeToValueType(const Interface_ParamType typ); 0067 0068 //! Correspondence ParamType from Interface to ValueType from MoniTool 0069 Standard_EXPORT static Interface_ParamType ValueTypeToParamType(const MoniTool_ValueType typ); 0070 0071 DEFINE_STANDARD_RTTIEXT(Interface_TypedValue, MoniTool_TypedValue) 0072 0073 private: 0074 TCollection_AsciiString thename; 0075 TCollection_AsciiString thedef; 0076 TCollection_AsciiString thelabel; 0077 occ::handle<Standard_Type> theotyp; 0078 TCollection_AsciiString theunidef; 0079 occ::handle<NCollection_HArray1<TCollection_AsciiString>> theenums; 0080 NCollection_DataMap<TCollection_AsciiString, int> theeadds; 0081 TCollection_AsciiString thesatisn; 0082 occ::handle<TCollection_HAsciiString> thehval; 0083 occ::handle<Standard_Transient> theoval; 0084 }; 0085 0086 #endif // _Interface_TypedValue_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|