33 #include "BESVersionInfo.h" 34 #include "BESInfoList.h" 35 #include "BESInternalError.h" 44 BESInfo(), _inbes(false), _inhandler(false), _info(0)
46 _info = BESInfoList::TheList()->build_info();
49 BESVersionInfo::~BESVersionInfo()
51 if (_info)
delete _info;
54 void BESVersionInfo::add_library(
const string &name,
const string &vers)
56 add_version(
"library", name, vers);
59 void BESVersionInfo::add_module(
const string &name,
const string &vers)
61 add_version(
"module", name, vers);
64 void BESVersionInfo::add_service(
const string &name,
const list<string> &vers)
66 map<string, string> props;
68 begin_tag(
"serviceVersion", &props);
69 list<string>::const_iterator i = vers.begin();
70 list<string>::const_iterator e = vers.end();
72 add_tag(
"version", (*i));
74 end_tag(
"serviceVersion");
77 void BESVersionInfo::add_version(
const string &type,
const string &name,
const string &vers)
79 map<string, string> attrs;
81 add_tag(type, vers, &attrs);
93 strm << BESIndent::LMarg <<
"BESVersionInfo::dump - (" << (
void *)
this <<
")" << endl;
95 strm << BESIndent::LMarg <<
"in BES version? " << _inbes << endl;
96 strm << BESIndent::LMarg <<
"in Handler version? " << _inhandler << endl;
98 strm << BESIndent::LMarg <<
"redirection info object:" << endl;
101 BESIndent::UnIndent();
104 strm << BESIndent::LMarg <<
"redirection info object: null" << endl;
107 BESIndent::UnIndent();
virtual void dump(ostream &strm) const
Displays debug information about this object.
BESVersionInfo()
constructs a basic text information response object to write version information
informational response object
virtual void dump(ostream &strm) const
dumps information about this object