|
||||
File indexing completed on 2025-01-18 10:04:08
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 0028 class Interface_TypedValue; 0029 DEFINE_STANDARD_HANDLE(Interface_TypedValue, MoniTool_TypedValue) 0030 0031 //! Now strictly equivalent to TypedValue from MoniTool, 0032 //! except for ParamType which remains for compatibility reasons 0033 //! 0034 //! This class allows to dynamically manage .. typed values, i.e. 0035 //! values which have an alphanumeric expression, but with 0036 //! controls. Such as "must be an Integer" or "Enumerative Text" 0037 //! etc 0038 //! 0039 //! Hence, a TypedValue brings a specification (type + constraints 0040 //! if any) and a value. Its basic form is a string, it can be 0041 //! specified as integer or real or enumerative string, then 0042 //! queried as such. 0043 //! Its string content, which is a Handle(HAsciiString) can be 0044 //! shared by other data structures, hence gives a direct on line 0045 //! access to its value. 0046 class Interface_TypedValue : public MoniTool_TypedValue 0047 { 0048 0049 public: 0050 0051 0052 //! Creates a TypedValue, with a name 0053 //! 0054 //! type gives the type of the parameter, default is free text 0055 //! Also available : Integer, Real, Enum, Entity (i.e. Object) 0056 //! More precise specifications, titles, can be given to the 0057 //! TypedValue once created 0058 //! 0059 //! init gives an initial value. If it is not given, the 0060 //! TypedValue begins as "not set", its value is empty 0061 Standard_EXPORT Interface_TypedValue(const Standard_CString name, const Interface_ParamType type = Interface_ParamText, const Standard_CString init = ""); 0062 0063 //! Returns the type 0064 //! I.E. calls ValueType then makes correspondence between 0065 //! ParamType from Interface (which remains for compatibility 0066 //! reasons) and ValueType from MoniTool 0067 Standard_EXPORT Interface_ParamType Type() const; 0068 0069 //! Correspondence ParamType from Interface to ValueType from MoniTool 0070 Standard_EXPORT static MoniTool_ValueType ParamTypeToValueType (const Interface_ParamType typ); 0071 0072 //! Correspondence ParamType from Interface to ValueType from MoniTool 0073 Standard_EXPORT static Interface_ParamType ValueTypeToParamType (const MoniTool_ValueType typ); 0074 0075 0076 0077 0078 DEFINE_STANDARD_RTTIEXT(Interface_TypedValue,MoniTool_TypedValue) 0079 0080 protected: 0081 0082 0083 0084 0085 private: 0086 0087 0088 TCollection_AsciiString thename; 0089 TCollection_AsciiString thedef; 0090 TCollection_AsciiString thelabel; 0091 Handle(Standard_Type) theotyp; 0092 TCollection_AsciiString theunidef; 0093 Handle(TColStd_HArray1OfAsciiString) theenums; 0094 NCollection_DataMap<TCollection_AsciiString, Standard_Integer> theeadds; 0095 TCollection_AsciiString thesatisn; 0096 Handle(TCollection_HAsciiString) thehval; 0097 Handle(Standard_Transient) theoval; 0098 0099 0100 }; 0101 0102 0103 0104 0105 0106 0107 0108 #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 |