xc
ExprBase.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // xc utils library; general purpose classes and functions.
4 //
5 // Copyright (C) Luis C. Pérez Tato
6 //
7 // XC utils is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // This software is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program.
19 // If not, see <http://www.gnu.org/licenses/>.
20 //----------------------------------------------------------------------------
21 //ExprBase.h
22 
23 #ifndef EXPRBASE_H
24 #define EXPRBASE_H
25 
26 #include "ProtoExpr.h"
27 
28 class ExprBase: public ProtoExpresion
29  {
30  protected:
31  bool err_traduc;
32  public:
34  ExprBase(const bool &ET)
35  : ProtoExpresion(), err_traduc(ET) {}
36  virtual bool operator==(const ExprBase &) const;
37  inline bool operator!=(const ExprBase &other) const
38  { return !operator==(other); }
40  inline bool ErrorTraduccion(void) const
41  { return err_traduc; }
42  };
43 
44 #endif
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
Definition: ProtoExpr.h:35
bool ErrorTraduccion(void) const
Devuelve verdadero si ha habido errores en la traducción.
Definition: ExprBase.h:40
virtual bool operator==(const ExprBase &) const
Comparison operator.
Definition: ExprBase.cc:24
ExprBase(const bool &ET)
Constructor por defecto.
Definition: ExprBase.h:34
Definition: ExprBase.h:28
bool err_traduc
Verdadero si se produce un error en la traducción.
Definition: ExprBase.h:31