89 void set(const char *identifier_str, value_t value); // Will change value associated to string if already in map. Will create new entry if string not in map. |
89 void set(const char *identifier_str, value_t value); // Will change value associated to string if already in map. Will create new entry if string not in map. |
90 void set(const symbol_c *symbol, value_t value); // Will change value associated to string if already in map. Will create new entry if string not in map. |
90 void set(const symbol_c *symbol, value_t value); // Will change value associated to string if already in map. Will create new entry if string not in map. |
91 void insert(const char *identifier_str, value_t value); // insert a new (string,value) pair. Give an error if string already in map associated to different value! |
91 void insert(const char *identifier_str, value_t value); // insert a new (string,value) pair. Give an error if string already in map associated to different value! |
92 void insert(const symbol_c *symbol, value_t value); // insert a new (string,value) pair. Give an error if string already in map associated to different value! |
92 void insert(const symbol_c *symbol, value_t value); // insert a new (string,value) pair. Give an error if string already in map associated to different value! |
93 |
93 |
94 value_t operator[](const char *identifier_str); |
94 value_t& operator[](const char *identifier_str); |
95 value_t operator[](const std::string identifier_str); |
95 value_t& operator[](const std::string identifier_str); |
96 // value_t operator[](const symbol_c *identifier ); // not yet implemented |
96 // value_t& operator[](const symbol_c *identifier ); // not yet implemented |
97 |
97 |
98 /* Since symtable_c does not allow duplicates in each level, count() will return |
98 /* Since symtable_c does not allow duplicates in each level, count() will return |
99 * - 0 : if not found in any level |
99 * - 0 : if not found in any level |
100 * - n : number of level containing that entry (max is current number of levels!) |
100 * - n : number of level containing that entry (max is current number of levels!) |
101 */ |
101 */ |