xc
TablaVariables.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 //TablaVariables.h
22 
23 #ifndef TABLAVARIABLES_H
24 #define TABLAVARIABLES_H
25 
26 #include "TablaSegnales.h"
27 #include "Variable.h"
28 
30 
32  {
33  public:
34  TablaVariables(void) : tabla_variables() {}
35  inline NamedOperand *Nueva(const Variable &v)
36  { return tabla_variables::Nueva(v); }
37  inline NamedOperand *Nueva(const std::string &palabra)
38  { return tabla_variables::Nueva(Variable(palabra)); }
39 
40  inline void Asigna(const std::string &palabra,const double &d)
41  {
42  Variable *v;
43  if((v=CalcDir(palabra))) v->Asigna(d);
44  }
45  inline void DesAsigna(const std::string &palabra)
46  {
47  Variable *v;
48  if((v= CalcDir(palabra))) v->DesAsigna();
49  }
50  };
51 
52 #endif
Definition: TablaSegnales.h:31
Definition: NamedOperand.h:28
Definition: TablaVariables.h:31
Definition: Variable.h:31