|
||||
File indexing completed on 2025-01-18 10:05:29
0001 // Created on: 1992-06-22 0002 // Created by: Gilles DEBARBOUILLE 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 _Units_Lexicon_HeaderFile 0018 #define _Units_Lexicon_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <Standard_Time.hxx> 0024 #include <Units_TokensSequence.hxx> 0025 #include <Standard_Transient.hxx> 0026 #include <Standard_CString.hxx> 0027 #include <Standard_Boolean.hxx> 0028 #include <Standard_Real.hxx> 0029 0030 0031 class Units_Lexicon; 0032 DEFINE_STANDARD_HANDLE(Units_Lexicon, Standard_Transient) 0033 0034 //! This class defines a lexicon useful to analyse and 0035 //! recognize the different key words included in a 0036 //! sentence. The lexicon is stored in a sequence of 0037 //! tokens. 0038 class Units_Lexicon : public Standard_Transient 0039 { 0040 0041 public: 0042 0043 0044 //! Creates an empty instance of Lexicon. 0045 Standard_EXPORT Units_Lexicon(); 0046 0047 //! Reads the file <afilename> to create a sequence of tokens 0048 //! stored in <thesequenceoftokens>. 0049 Standard_EXPORT void Creates (); 0050 0051 //! Returns the first item of the sequence of tokens. 0052 Handle(Units_TokensSequence) Sequence() const; 0053 0054 //! Adds to the lexicon a new token with <aword>, <amean>, 0055 //! <avalue> as arguments. If there is already a token 0056 //! with the field <theword> equal to <aword>, the 0057 //! existing token is updated. 0058 Standard_EXPORT void AddToken (const Standard_CString aword, const Standard_CString amean, const Standard_Real avalue); 0059 0060 //! Useful for debugging. 0061 virtual void Dump() const; 0062 0063 0064 0065 0066 DEFINE_STANDARD_RTTIEXT(Units_Lexicon,Standard_Transient) 0067 0068 protected: 0069 0070 0071 0072 0073 private: 0074 0075 Handle(Units_TokensSequence) thesequenceoftokens; 0076 0077 0078 }; 0079 0080 0081 #include <Units_Lexicon.lxx> 0082 0083 0084 0085 0086 0087 #endif // _Units_Lexicon_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |