Salome HOME
Base implementation of Notebook
[modules/kernel.git] / src / Notebook / SALOME_Eval.hxx
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  File   : SALOME_Eval.hxx
23 //  Author : Peter KURNEV
24 //  Module : SALOME
25
26
27 #ifndef SALOME_Eval_Header_File
28 #define SALOME_Eval_Header_File
29
30 #ifdef WNT
31 #pragma warning(disable : 4786)
32 #endif
33
34 #include <string>
35 #include <list>
36 #include <set>
37
38 typedef std::string                 SALOME_String;
39 typedef std::list<SALOME_String>    SALOME_StringList;
40 typedef SALOME_StringList::iterator SALOME_ListIteratorOfStringList;
41 typedef std::set<SALOME_String>     SALOME_StringSet;
42 typedef SALOME_StringSet::iterator  SALOME_SetIteratorOfStringSet;
43 typedef std::pair< SALOME_SetIteratorOfStringSet, bool > SALOME_SetPair;
44   
45 typedef enum
46 {
47   EvalExpr_OK,               //!< No errors found
48   EvalExpr_OperandsNotMatch, //!< Types of arguments are invalid for this operation
49   EvalExpr_InvalidResult,    //!< Operation cannot find result (for example, division by zero)
50   EvalExpr_InvalidOperation, //!< Unknown operation
51   EvalExpr_OperationsNull,   //!< Internal operations pointer of parser is null
52   EvalExpr_InvalidToken,     //!< Invalid token (neither operation, nor parameter of value)
53   EvalExpr_CloseExpected,    //!< Closing bracket is expected
54   EvalExpr_ExcessClose,      //!< Extra closing bracket is found
55   EvalExpr_BracketsNotMatch, //!< Opening and closing brackets are of different type, e.g. [)
56   EvalExpr_StackUnderflow,   //!< There are no arguments in the stack for the operation
57   EvalExpr_ExcessData        //!< The parsing is finished, but there are more then one value in the stack
58 } SALOME_EvalExprError;
59
60 #endif