|
||||
File indexing completed on 2025-01-18 10:03:54
0001 // Created on: 1994-04-21 0002 // Created by: Christian CAILLET 0003 // Copyright (c) 1994-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_Signature_HeaderFile 0018 #define _IFSelect_Signature_HeaderFile 0019 0020 #include <Standard.hxx> 0021 0022 #include <Standard_Integer.hxx> 0023 #include <TColStd_HSequenceOfAsciiString.hxx> 0024 #include <TCollection_AsciiString.hxx> 0025 #include <Interface_SignType.hxx> 0026 class Standard_Transient; 0027 class Interface_InterfaceModel; 0028 0029 0030 class IFSelect_Signature; 0031 DEFINE_STANDARD_HANDLE(IFSelect_Signature, Interface_SignType) 0032 0033 //! Signature provides the basic service used by the classes 0034 //! SelectSignature and Counter (i.e. Name, Value), which is : 0035 //! - for an entity in a model, give a characteristic string, its 0036 //! signature 0037 //! This string has not to be unique in the model, but gives a 0038 //! value for such or such important feature. 0039 //! Examples : Dynamic Type; Category; etc 0040 class IFSelect_Signature : public Interface_SignType 0041 { 0042 0043 public: 0044 0045 0046 //! Sets the information data to tell "integer cases" with 0047 //! possible min and max values 0048 //! To be called when creating 0049 Standard_EXPORT void SetIntCase (const Standard_Boolean hasmin, const Standard_Integer valmin, const Standard_Boolean hasmax, const Standard_Integer valmax); 0050 0051 //! Tells if this Signature gives integer values 0052 //! and returns values from SetIntCase if True 0053 Standard_EXPORT Standard_Boolean IsIntCase (Standard_Boolean& hasmin, Standard_Integer& valmin, Standard_Boolean& hasmax, Standard_Integer& valmax) const; 0054 0055 //! Adds a possible case 0056 //! To be called when creating, IF the list of possible cases for 0057 //! Value is known when starting 0058 //! For instance, for CDL types, rather do not fill this, 0059 //! but for a specific enumeration (such as a status), can be used 0060 Standard_EXPORT void AddCase (const Standard_CString acase); 0061 0062 //! Returns the predefined list of possible cases, filled by AddCase 0063 //! Null Handle if no predefined list (hence, to be counted) 0064 //! Useful to filter on really possible vase, for instance, or 0065 //! for a help 0066 Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) CaseList() const; 0067 0068 //! Returns an identification of the Signature (a word), given at 0069 //! initialization time 0070 //! Returns the Signature for a Transient object. It is specific 0071 //! of each sub-class of Signature. For a Null Handle, it should 0072 //! provide "" 0073 //! It can work with the model which contains the entity 0074 Standard_EXPORT Standard_CString Name() const Standard_OVERRIDE; 0075 0076 //! The label of a Signature uses its name as follow : 0077 //! "Signature : <name>" 0078 Standard_EXPORT TCollection_AsciiString Label() const; 0079 0080 //! Tells if the value for <ent> in <model> matches a text, with 0081 //! a criterium <exact>. 0082 //! The default definition calls MatchValue 0083 //! Can be redefined 0084 Standard_EXPORT virtual Standard_Boolean Matches (const Handle(Standard_Transient)& ent, const Handle(Interface_InterfaceModel)& model, const TCollection_AsciiString& text, const Standard_Boolean exact) const; 0085 0086 //! Default procedure to tell if a value <val> matches a text 0087 //! with a criterium <exact>. <exact> = True requires equality, 0088 //! else only contained (no reg-exp) 0089 Standard_EXPORT static Standard_Boolean MatchValue (const Standard_CString val, const TCollection_AsciiString& text, const Standard_Boolean exact); 0090 0091 //! This procedure converts an Integer to a CString 0092 //! It is a convenient way when the value of a signature has the 0093 //! form of a simple integer value 0094 //! The value is to be used immediately (one buffer only, no copy) 0095 Standard_EXPORT static Standard_CString IntValue (const Standard_Integer val); 0096 0097 0098 0099 0100 DEFINE_STANDARD_RTTIEXT(IFSelect_Signature,Interface_SignType) 0101 0102 protected: 0103 0104 0105 //! Initializes a Signature with its name 0106 Standard_EXPORT IFSelect_Signature(const Standard_CString name); 0107 0108 TCollection_AsciiString thename; 0109 0110 0111 private: 0112 0113 0114 Standard_Integer thecasi[3]; 0115 Handle(TColStd_HSequenceOfAsciiString) thecasl; 0116 0117 0118 }; 0119 0120 0121 0122 0123 0124 0125 0126 #endif // _IFSelect_Signature_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |