xc
OpBooleano.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 //OpBooleano.h
22 
23 #ifndef OPBOOLEANO_H
24 #define OPBOOLEANO_H
25 
26 #include "OpBinario.h"
27 #include "OpUnario.h"
28 
30 class OpBooleano: public OpBinario
31  {
32  public:
33  OpBooleano(void) : OpBinario() {}
34  inline virtual int GetPrioridad(void) const
35  { return 3; }
36  };
37 
40 class OpAnd : public OpBooleano
41  {
42 
43  public:
44  OpAnd(void) : OpBooleano() {}
45  inline virtual const std::string &getName(void) const
46  { return nmbOpAnd; }
47  virtual const Operando &Opera(const Operando *v1= NULL,const Operando *v2= NULL) const;
48  };
49 
52 class OpOr : public OpBooleano
53  {
54 
55  public:
56  OpOr(void) : OpBooleano() {}
57  inline virtual const std::string &getName(void) const
58  { return nmbOpOr; }
59  virtual const Operando &Opera(const Operando *v1= NULL,const Operando *v2= NULL) const;
60  };
61 
62 class OpNot : public OpUnario
63  {
64 
65  public:
66  OpNot(void) : OpUnario() {}
67  inline virtual const std::string &getName(void) const
68  { return nmbOpNot; }
69  virtual const Operando &Opera(const Operando *,const Operando *v2= NULL) const;
70  };
71 
72 #endif
virtual const std::string & getName(void) const
Return the operand name.
Definition: OpBooleano.h:57
Definition: OpUnario.h:29
Operador AND.
Definition: OpBooleano.h:40
Operador OR.
Definition: OpBooleano.h:52
virtual const std::string & getName(void) const
Return the operand name.
Definition: OpBooleano.h:67
Definition: OpBooleano.h:62
Clase base para operadores de comparación.
Definition: OpBooleano.h:30
Operando.
Definition: Operando.h:42
Operador binario.
Definition: OpBinario.h:32
virtual const std::string & getName(void) const
Return the operand name.
Definition: OpBooleano.h:45