87 ifstream * _keys_file;
88 string _keys_file_name;
89 map<string, vector<string> > *_the_keys;
92 static vector<string> KeyList;
93 static bool LoadedKeys(
const string &key_file);
96 void initialize_keys();
98 bool break_pair(
const char* b,
string& key,
string &value,
bool &addto);
99 bool only_blanks(
const char *line);
100 void load_include_files(
const string &files);
101 void load_include_file(
const string &file);
104 _keys_file(0), _keys_file_name(
""), _the_keys(0), _own_keys(
false)
108 BESKeys(
const string &keys_file_name, map<
string, vector<string> > *keys);
111 BESKeys(
const string &keys_file_name);
116 string keys_file_name()
const 118 return _keys_file_name;
121 void set_key(
const string &key,
const string &val,
bool addto =
false);
122 void set_key(
const string &pair);
123 void get_value(
const string& s,
string &val,
bool &found);
124 void get_values(
const string& s, vector<string> &vals,
bool &found);
126 typedef map<string, vector<string> >::const_iterator Keys_citer;
128 Keys_citer keys_begin()
130 return _the_keys->begin();
133 Keys_citer keys_end()
135 return _the_keys->end();
138 virtual void dump(ostream &strm)
const;
virtual ~BESKeys()
cleans up the key/value pair mapping
virtual void dump(ostream &strm) const
dumps information about this object
Base object for bes objects.
void set_key(const string &key, const string &val, bool addto=false)
allows the user to set key/value pairs from within the application.
mapping of key/value pairs defining different behaviors of an application.
void get_value(const string &s, string &val, bool &found)
Retrieve the value of a given key, if set.
void get_values(const string &s, vector< string > &vals, bool &found)
Retrieve the values of a given key, if set.