bes  Updated for version 3.17.4
BESVersionInfo Class Reference

#include <BESVersionInfo.h>

Inheritance diagram for BESVersionInfo:
Inheritance graph

Public Member Functions

virtual void add_break (unsigned long num_breaks)
 
virtual void add_data (const string &s)
 add data to this informational object. If buffering is not set then the information is output directly to the output stream. More...
 
virtual void add_data_from_file (const string &key, const string &name)
 add data from a file to the informational object. More...
 
virtual void add_exception (BESError &e, const string &admin)
 add exception information to this informational object More...
 
virtual void add_library (const string &n, const string &v)
 
virtual void add_module (const string &n, const string &v)
 
virtual void add_service (const string &n, const list< string > &vers)
 
virtual void add_space (unsigned long num_spaces)
 
virtual void add_tag (const string &tag_name, const string &tag_data, map< string, string > *attrs=0)
 
virtual void begin_response (const string &response_name, BESDataHandlerInterface &dhi)
 begin the informational response More...
 
virtual void begin_tag (const string &tag_name, map< string, string > *attrs=0)
 
 BESVersionInfo ()
 constructs a basic text information response object to write version information More...
 
virtual void dump (ostream &strm) const
 dumps information about this object More...
 
virtual void end_response ()
 
virtual void end_tag (const string &tag_name)
 
virtual bool is_buffered ()
 return whether the information is to be buffered or not. More...
 
virtual void print (ostream &strm)
 print the information from this informational object to the specified stream More...
 
virtual void transmit (BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
 transmit the informational object More...
 

Protected Attributes

bool _buffered
 
string _response_name
 
bool _response_started
 
ostream * _strm
 
bool _strm_owned
 
stack< string > _tags
 

Detailed Description

brief represents simple text information in a response object, such as version and help information.

Uses the default add_data and print methods, where the print method, if the response is going to a browser, sets the MIME type to text.

See also
BESXMLInfo
BESResponseObject

Definition at line 47 of file BESVersionInfo.h.

Constructor & Destructor Documentation

◆ BESVersionInfo()

BESVersionInfo::BESVersionInfo ( )
See also
BESXMLInfo
BESResponseObject

Definition at line 43 of file BESVersionInfo.cc.

Member Function Documentation

◆ add_data()

virtual void BESVersionInfo::add_data ( const string &  s)
inlinevirtual
Parameters
sinformation to be added to this informational response object

Reimplemented from BESInfo.

Definition at line 90 of file BESVersionInfo.h.

References BESInfo::add_data().

◆ add_data_from_file()

virtual void BESVersionInfo::add_data_from_file ( const string &  key,
const string &  name 
)
inlinevirtual

Adds data from a file to the informational object using the file specified by the passed key string. The key is found from the bes configuration file.

If the key does not exist in the initialization file then this information is added to the informational object, no excetion is thrown.

If the file does not exist then this information is added to the informational object, no exception is thrown.

Parameters
keyKey from the initialization file specifying the file to be
nameA description of what is the information being loaded

Reimplemented from BESInfo.

Definition at line 102 of file BESVersionInfo.h.

References BESInfo::add_data_from_file().

◆ add_exception()

virtual void BESVersionInfo::add_exception ( BESError e,
const string &  admin 
)
inlinevirtual

Exception information is added differently to different informational objects, such as html, xml, plain text. But, using the other methods of this class we can take care of exceptions here.

Parameters
eThe exception to add to the informational response object
adminThe contact information for the person responsible for this error

Reimplemented from BESInfo.

Definition at line 107 of file BESVersionInfo.h.

References BESInfo::add_exception().

◆ begin_response()

virtual void BESVersionInfo::begin_response ( const string &  response_name,
BESDataHandlerInterface dhi 
)
inlinevirtual

basic setup of the response from abstract class

Parameters
response_namename of the response this information represents
dhiinformation about the request and response

Reimplemented from BESInfo.

Definition at line 64 of file BESVersionInfo.h.

References BESInfo::begin_response().

◆ dump()

void BESVersionInfo::dump ( ostream &  strm) const
virtual

Displays the pointer value of this instance along with information about this version information object

Parameters
strmC++ i/o stream to dump the information to

Reimplemented from BESInfo.

Definition at line 102 of file BESVersionInfo.cc.

References BESInfo::dump().

◆ is_buffered()

virtual bool BESInfo::is_buffered ( )
inlinevirtualinherited
Returns
true if information is buffered, false if not

Definition at line 123 of file BESInfo.h.

References BESInfo::dump().

◆ print()

virtual void BESVersionInfo::print ( ostream &  strm)
inlinevirtual

If the information was not buffered then this method does nothing, otherwise the information is output to the specified ostream.

Parameters
strmoutput to this file descriptor if information buffered.

Reimplemented from BESInfo.

Definition at line 116 of file BESVersionInfo.h.

References dump(), and BESInfo::print().

◆ transmit()

virtual void BESVersionInfo::transmit ( BESTransmitter transmitter,
BESDataHandlerInterface dhi 
)
inlinevirtual

The derived informational object knows how it needs to be transmitted. Does it need to be sent as html? As text? As something else?

Parameters
transmitterThe type of transmitter to use to transmit the info
dhiinformation to help with the transmission

Implements BESInfo.

Definition at line 111 of file BESVersionInfo.h.

References BESInfo::transmit().


The documentation for this class was generated from the following files: