Stores symbol mapping of variables to indexes (compile time). More...
#include <c_micro_symbol_variable_mapping.h>
Public Member Functions | |
c_micro_symbol_variable_mapping () | |
Constructor. | |
c_micro_symbol_variable_mapping (const c_micro_symbol_variable_mapping &orig) | |
c_micro_symbol_variable_mapping (const c_micro_symbol_variable_mapping &orig, c_micro_symbol_variable_table *t) | |
~c_micro_symbol_variable_mapping () | |
var_sym_index_t | add (const string &var_name) |
Adds new mapping (if it does not exist yet). | |
var_sym_index_t | add () |
Adds new mapping (new temporary symbol). | |
var_sym_index_t | add (string var_name, c_expression *exp) |
Adds new mapping (if it does not exist yet). | |
var_sym_index_t | get_capacity () |
Gets number of symbols. | |
var_sym_index_t | get_var_index (const string &var_name) |
Gets variable index from its name. | |
const map< var_sym_index_t, string > & | get_var_mapping () |
Gets variable mapping map. | |
string | get_var_name (var_sym_index_t index) |
Gets variable name from mapping. | |
void | instantiate_consts (c_micro_symbol_variable_table *t) |
Creates entries in variable table from table of constants. | |
void | reset () |
Resets/cleans-up class. | |
Private Attributes | |
map< var_sym_index_t, c_var_base * > | consts |
Constants. | |
map< var_sym_index_t, string > | mapping |
Mapping of index to variable name. | |
var_sym_index_t | next_index |
Next index. | |
Friends | |
class | c_function |
class | c_micro_symbol_table |
Stores symbol mapping of variables to indexes (compile time).
Definition at line 64 of file c_micro_symbol_variable_mapping.h.