Calculator  Step 4
variables.hpp
Go to the documentation of this file.
1 #ifndef VARIABLES_HPP_
2 #define VARIABLES_HPP_
3 
4 #include <map>
5 #include <string>
6 
7 #include "node.hpp"
8 
13 typedef std::map<std::string, node> symbol_table;
14 
20 {
21  public:
22  set_symbol_table(symbol_table const& symtab);
24 };
25 
30 node get_variable(std::string const& name);
31 
37 node get_function(std::string const& name);
38 
43 void set_variable(std::string const& name, node value);
44 
49 void set_function(std::string const& name, node definition);
50 
51 #endif
node get_function(std::string const &name)
Definition: variables.cpp:61
Definition: node.hpp:26
void set_variable(std::string const &name, node value)
Definition: variables.cpp:56
void set_function(std::string const &name, node value)
Definition: variables.cpp:70
set_symbol_table(symbol_table const &symtab)
Definition: variables.cpp:22
node get_variable(std::string const &name)
Definition: variables.cpp:45
std::map< std::string, node > symbol_table
Definition: variables.hpp:13