Inter4ql  5.2
VariableSpace.h
1 #ifndef VARIABLESPACE_H
2 #define VARIABLESPACE_H
3 
4 #include <vector>
5 #include <map>
6 #include <string>
7 
8 namespace Inter4ql {
9 
10  class Value;
13  class VariableSpace {
14  public:
17  VariableSpace();
23  void clear();
28  std::string print();
36  Value *get_pointer(Value* _v, std::string _module, std::string _domain, bool& _changed);
44  std::map<int, Value *> *get_integer_space(std::string _module, std::string _domain);
51  std::map<double, Value *> *get_real_space(std::string _module, std::string _domain);
58  std::map<std::string, Value *> *get_string_space(std::string _module, std::string _domain);
65  std::map<std::string, Value *> *get_const_space(std::string _module, std::string _domain);
72  std::map<std::string, Value *> *get_date_space(std::string _module, std::string _domain);
79  std::map<std::string, Value *> *get_datetime_space(std::string _module, std::string _domain);
86  std::map<int, Value *> *get_logic_space(std::string _module, std::string _domain);
87  private:
88  void initialize(std::string _module);
89 
90  Value *get_integer(Value *_v, std::string _module, std::string _domain, bool& _changed);
91  Value *get_real(Value *v, std::string _module, std::string _domain, bool& _changed);
92  Value *get_string(Value *v, std::string _module, std::string _domain, bool& _changed);
93  Value *get_const(Value *v, std::string _module, std::string _domain, bool& _changed);
94  Value *get_date(Value *v, std::string _module, std::string _domain, bool& _changed);
95  Value *get_datetime(Value *v, std::string _module, std::string _domain, bool& _changed);
96  Value *get_logic(Value *v, std::string _module, std::string _domain, bool& _changed);
97 
98  std::map<std::string, std::map<int, Value *>*> *integer_map;
99  std::map<std::string, std::map<double, Value *>*> *real_map;
100  std::map<std::string, std::map<std::string, Value *>*> *string_map;
101  std::map<std::string, std::map<std::string, Value *>*> *const_map;
102  std::map<std::string, std::map<std::string, Value *>*> *date_map;
103  std::map<std::string, std::map<std::string, Value *>*> *datetime_map;
104  std::map<std::string, std::map<int, Value *>*> *logic_map;
105 
106 
107  };
108 }
109 
110 #endif /* VARIABLESPACE_H */
111 
std::map< std::string, Value * > * get_string_space(std::string _module, std::string _domain)
getter of a variable type of a distinct type
VariableSpace class for handling all values in interpreter environment.
Definition: VariableSpace.h:13
std::map< int, Value * > * get_logic_space(std::string _module, std::string _domain)
getter of a variable type of a distinct type
std::map< int, Value * > * get_integer_space(std::string _module, std::string _domain)
getter of a variable type of a distinct type
void clear()
clears the variable space
Definition: VariableSpace.cc:79
Definition: Application.cc:37
VariableSpace()
constructor
Definition: VariableSpace.cc:39
std::map< std::string, Value * > * get_datetime_space(std::string _module, std::string _domain)
getter of a variable type of a distinct type
std::string print()
returns string with whole space of variables information
Definition: VariableSpace.cc:115
std::map< double, Value * > * get_real_space(std::string _module, std::string _domain)
getter of a variable type of a distinct type
std::map< std::string, Value * > * get_date_space(std::string _module, std::string _domain)
getter of a variable type of a distinct type
~VariableSpace()
destructor
Definition: VariableSpace.cc:55
Value class that handles different types of data.
Definition: Value.h:11
Value * get_pointer(Value *_v, std::string _module, std::string _domain, bool &_changed)
getter for a pointer to a value from variable space (not to create many instances of the same value) ...
Definition: VariableSpace.cc:93
std::map< std::string, Value * > * get_const_space(std::string _module, std::string _domain)
getter of a variable type of a distinct type