33 #include "BESContextManager.h" 46 _context_list[name] = value ;
57 _context_list.erase(name);
74 BESContextManager::Context_iter i;
75 i = _context_list.find(name);
76 if (i != _context_list.end()) {
91 map<string,string> props ;
92 BESContextManager::Context_citer i = _context_list.begin() ;
93 BESContextManager::Context_citer e = _context_list.end() ;
99 props[
"name"] = name ;
100 info.add_tag(
"context", value, &props ) ;
114 strm << BESIndent::LMarg <<
"BESContextManager::dump - (" 115 << (
void *)
this <<
")" << endl ;
116 BESIndent::Indent() ;
117 if( _context_list.size() )
119 strm << BESIndent::LMarg <<
"current context:" << endl ;
120 BESIndent::Indent() ;
121 BESContextManager::Context_citer i = _context_list.begin() ;
122 BESContextManager::Context_citer ie = _context_list.end() ;
123 for( ; i != ie; i++ )
125 strm << BESIndent::LMarg << (*i).first <<
": " << (*i).second
128 BESIndent::UnIndent() ;
132 strm << BESIndent::LMarg <<
"no context" << endl ;
134 BESIndent::UnIndent() ;
138 BESContextManager::TheManager()
maintains the list of registered request handlers for this server
virtual void dump(ostream &strm) const
dumps information about this object
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