91 /* returns: 0 if no entry is found, 1 if 1 entry is found, ..., n if n entries are found */ |
91 /* returns: 0 if no entry is found, 1 if 1 entry is found, ..., n if n entries are found */ |
92 int count(const char *identifier_str) {return _base.count(identifier_str);} |
92 int count(const char *identifier_str) {return _base.count(identifier_str);} |
93 int count(const symbol_c *symbol) {return count(symbol_to_string(symbol));} |
93 int count(const symbol_c *symbol) {return count(symbol_to_string(symbol));} |
94 |
94 |
95 /* Search for an entry. Will return end_value() if not found */ |
95 /* Search for an entry. Will return end_value() if not found */ |
96 value_t end_value(void) {return _base.end(); return null_value;} |
96 value_t end_value(void) {return null_value;} |
97 value_t find_value(const char *identifier_str); |
97 value_t find_value(const char *identifier_str); |
98 value_t find_value(const symbol_c *symbol) {return find_value(symbol_to_string(symbol));} |
98 value_t find_value(const symbol_c *symbol) {return find_value(symbol_to_string(symbol));} |
99 |
99 |
100 /* Search for an entry associated with identifier_str. Will return end() if not found */ |
100 /* Search for an entry associated with identifier_str. Will return end() if not found */ |
101 iterator find(const char *identifier_str) {return _base.find(identifier_str);} |
101 iterator find(const char *identifier_str) {return _base.find(identifier_str);} |
102 iterator find(const symbol_c *symbol) {return find(symbol_to_string(symbol));} |
102 iterator find(const symbol_c *symbol) {return find(symbol_to_string(symbol));} |
103 |
103 |
104 /* Search for the first entry associated with (i.e. with key ==) identifier_str. Will return end() if not found */ |
104 /* Search for the first entry associated with (i.e. with key ==) identifier_str. Will return end() if not found (NOTE: end() != end_value()) */ |
105 /* Basically, the same as find() */ |
105 iterator lower_bound(const char *identifier_str) {return ((count(identifier_str) == 0)? _base.end() : _base.lower_bound(identifier_str));} |
106 iterator lower_bound(const char *identifier_str) {return _base.lower_bound(identifier_str);} |
|
107 iterator lower_bound(const symbol_c *symbol) {return lower_bound(symbol_to_string(symbol));} |
106 iterator lower_bound(const symbol_c *symbol) {return lower_bound(symbol_to_string(symbol));} |
108 |
107 |
109 /* Search for the first entry with key greater than identifier_str. Will return end() if not found */ |
108 /* Search for the first entry with key greater than identifier_str. Will return end() if not found */ |
110 iterator upper_bound(const char *identifier_str) {return _base.upper_bound(identifier_str);} |
109 iterator upper_bound(const char *identifier_str) {return _base.upper_bound(identifier_str);} |
111 iterator upper_bound(const symbol_c *symbol) {return upper_bound(symbol_to_string(symbol));} |
110 iterator upper_bound(const symbol_c *symbol) {return upper_bound(symbol_to_string(symbol));} |