23 #ifndef TABLALITERALES_H 24 #define TABLALITERALES_H 37 explicit Literal(
const double &d= 0.0);
38 inline virtual bool Evaluable(
void)
const 40 inline virtual bool EqualTo(
const double &d)
const 41 {
return (valor == d); }
43 virtual int GetPrioridad(
void)
const 45 std::ostream &Imprime(std::ostream &os)
const;
47 friend int operator <(
const Literal &c1,
const Literal &c2)
48 {
return (c1.valor < c2.valor); }
49 friend int operator ==(
const Literal &c1,
const Literal &c2)
50 {
return (c1.valor == c2.valor); }
51 friend int operator !=(
const Literal &c1,
const Literal &c2)
52 {
return (c1.valor != c2.valor); }
53 friend int operator >(
const Literal &c1,
const Literal &c2)
54 {
return (c1.valor > c2.valor); }
57 typedef std::map<Literal,size_t> tabla_literales;
58 typedef tabla_literales::iterator iterator;
59 typedef tabla_literales::const_iterator const_iterator;
60 typedef tabla_literales::value_type value_type;
61 tabla_literales literales;
63 const Literal *Nuevo(
const Literal &l);
64 void NuevaRef(
const Literal &l);
65 void Borra(
const Literal &l);
68 inline const Operando *NuevoDbl(
const double &d)
69 {
return Nuevo(Literal(d)); }
70 void NuevaRef(
const double &);
71 void NuevaRef(
const Segnal *);
72 void Borra(
const double &d);
74 inline size_t size(
void)
const 75 {
return literales.size(); }
void BorraSiLiteral(const Segnal *s)
Quita el literal de la tabla si efectivamente el puntero corresponde a un literal.
Definition: TablaLiterales.cc:121
Definition: Variable.h:31
Operando.
Definition: Operando.h:42
Componente elemental de una expresión.
Definition: Segnal.h:60
Definition: TablaLiterales.h:29
TablaLiterales(void)
Constructor.
Definition: TablaLiterales.cc:49