33 #include "BESVersionInfo.h" 34 #include "BESInfoList.h" 35 #include "BESInternalError.h" 49 _info = BESInfoList::TheList()->build_info() ;
52 BESVersionInfo::~BESVersionInfo()
54 if( _info )
delete _info ;
58 BESVersionInfo::add_library(
const string &name,
const string &vers )
60 add_version(
"library", name, vers ) ;
64 BESVersionInfo::add_module(
const string &name,
const string &vers )
66 add_version(
"module", name, vers ) ;
70 BESVersionInfo::add_service(
const string &name,
const list<string> &vers )
72 map<string,string> props ;
73 props[
"name"] = name ;
74 begin_tag(
"serviceVersion", &props ) ;
75 list<string>::const_iterator i = vers.begin() ;
76 list<string>::const_iterator e = vers.end() ;
79 add_tag(
"version", (*i) ) ;
81 end_tag(
"serviceVersion" ) ;
85 BESVersionInfo::add_version(
const string &type,
89 map<string,string> attrs ;
90 attrs[
"name"] = name ;
91 add_tag( type, vers, &attrs ) ;
104 strm << BESIndent::LMarg <<
"BESVersionInfo::dump - (" 105 << (
void *)
this <<
")" << endl ;
106 BESIndent::Indent() ;
107 strm << BESIndent::LMarg <<
"in BES version? " << _inbes << endl ;
108 strm << BESIndent::LMarg <<
"in Handler version? " << _inhandler << endl ;
111 strm << BESIndent::LMarg <<
"redirection info object:" << endl ;
112 BESIndent::Indent() ;
113 _info->
dump( strm ) ;
114 BESIndent::UnIndent() ;
118 strm << BESIndent::LMarg <<
"redirection info object: null" << endl ;
121 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