#include <rutz/assocarray.h>
Public Member Functions | |
assoc_array (const char *descr, bool nocase=false) | |
Default constructor. | |
rutz::fstring | get_known_keys (const char *sep) const |
Get a string listing of known keys, separated by the string sep. | |
void | throw_for_key (const char *key, const rutz::file_pos &pos) const |
Raise an exception reporting an unknown key. | |
void | throw_for_key (const rutz::fstring &key, const rutz::file_pos &pos) const |
Raise an exception reporting an unknown key. | |
value_t * | get_ptr_for_key (const rutz::fstring &key) const |
Get the object associated with the given key. | |
value_t * | get_ptr_for_key (const char *key) const |
Get the object associated with the given key. | |
void | set_ptr_for_key (const char *key, value_t *ptr) |
Associate the object at ptr with the given key. |
Definition at line 104 of file assocarray.h.
rutz::assoc_array< value_t >::assoc_array | ( | const char * | descr, | |
bool | nocase = false | |||
) | [inline] |
Default constructor.
descr | a human-readable description of what this array's keys represent; this is used in error messages, e.g. if descr is "frobnicator", then error messages would include "unknown frobnicator" | |
nocase | true if the array should use case-insensitive string comparisons (default is false, giving normal case-sensitive string comparisons) |
Definition at line 117 of file assocarray.h.