33 #include "BESContextManager.h" 45 _context_list[name] = value;
55 _context_list.erase(name);
71 BESContextManager::Context_iter i;
72 i = _context_list.find(name);
73 if (i != _context_list.end()) {
87 map<string, string> props;
88 BESContextManager::Context_citer i = _context_list.begin();
89 BESContextManager::Context_citer e = _context_list.end();
95 info.add_tag(
"context", value, &props);
108 strm << BESIndent::LMarg <<
"BESContextManager::dump - (" << (
void *)
this <<
")" << endl;
110 if (_context_list.size()) {
111 strm << BESIndent::LMarg <<
"current context:" << endl;
113 BESContextManager::Context_citer i = _context_list.begin();
114 BESContextManager::Context_citer ie = _context_list.end();
115 for (; i != ie; i++) {
116 strm << BESIndent::LMarg << (*i).first <<
": " << (*i).second << endl;
118 BESIndent::UnIndent();
121 strm << BESIndent::LMarg <<
"no context" << endl;
123 BESIndent::UnIndent();
127 BESContextManager::TheManager()
129 if (_instance == 0) {
maintains the list of registered request handlers for this server
virtual void set_context(const string &name, const string &value)
set context in the BES
virtual string get_context(const string &name, bool &found)
retrieve the value of the specified context from the BES
informational response object
virtual void list_context(BESInfo &info)
Adds all context and their values to the given informational object.
virtual void unset_context(const string &name)
set context in the BES
virtual void dump(ostream &strm) const
dumps information about this object