OPeNDAP Hyrax Back End Server (BES) Updated for version 3.8.3
|
brief represents simple text information in a response object, such as version and help inforamtion. More...
#include <BESVersionInfo.h>
Public Member Functions | |
virtual void | add_break (unsigned long num_breaks) |
virtual void | add_data (const string &s) |
add data to this informational object. | |
virtual void | add_data_from_file (const string &key, const string &name) |
add data from a file to the informational object. | |
virtual void | add_exception (BESError &e, const string &admin) |
add exception information to this informational object | |
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 | |
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 | |
virtual void | dump (ostream &strm) const |
dumps information about this object | |
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. | |
virtual void | print (ostream &strm) |
print the information from this informational object to the specified stream | |
virtual void | transmit (BESTransmitter *transmitter, BESDataHandlerInterface &dhi) |
transmit the informational object | |
virtual | ~BESVersionInfo () |
Protected Attributes | |
bool | _buffered |
string | _response_name |
bool | _response_started |
ostream * | _strm |
bool | _strm_owned |
stack< string > | _tags |
brief represents simple text information in a response object, such as version and help inforamtion.
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.
Definition at line 47 of file BESVersionInfo.h.
BESVersionInfo::BESVersionInfo | ( | ) |
constructs a basic text information response object to write version information
Definition at line 47 of file BESVersionInfo.cc.
References BESInfoList::build_info(), and BESInfoList::TheList().
BESVersionInfo::~BESVersionInfo | ( | ) | [virtual] |
Definition at line 56 of file BESVersionInfo.cc.
virtual void BESVersionInfo::add_break | ( | unsigned long | num_breaks | ) | [inline, virtual] |
Implements BESInfo.
Definition at line 98 of file BESVersionInfo.h.
References BESInfo::add_break().
virtual void BESVersionInfo::add_data | ( | const string & | s | ) | [inline, virtual] |
add data to this informational object.
If buffering is not set then the information is output directly to the output stream.
s | information to be added to this informational response object |
Reimplemented from BESInfo.
Definition at line 90 of file BESVersionInfo.h.
References BESInfo::add_data().
virtual void BESVersionInfo::add_data_from_file | ( | const string & | key, |
const string & | name | ||
) | [inline, virtual] |
add data from a file to the informational object.
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.
key | Key from the initialization file specifying the file to be |
name | A 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().
virtual void BESVersionInfo::add_exception | ( | BESError & | e, |
const string & | admin | ||
) | [inline, virtual] |
add exception information to this informational object
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.
e | The exception to add to the informational response object |
admin | The contact information for the person responsible for this error |
Reimplemented from BESInfo.
Definition at line 107 of file BESVersionInfo.h.
References BESInfo::add_exception().
void BESVersionInfo::add_library | ( | const string & | n, |
const string & | v | ||
) | [virtual] |
Definition at line 62 of file BESVersionInfo.cc.
Referenced by BESDapRequestHandler::dap_build_version(), and BESVersionResponseHandler::execute().
void BESVersionInfo::add_module | ( | const string & | n, |
const string & | v | ||
) | [virtual] |
Definition at line 68 of file BESVersionInfo.cc.
void BESVersionInfo::add_service | ( | const string & | n, |
const list< string > & | vers | ||
) | [virtual] |
Definition at line 74 of file BESVersionInfo.cc.
References add_tag(), begin_tag(), and end_tag().
Referenced by BESDapRequestHandler::dap_build_version().
virtual void BESVersionInfo::add_space | ( | unsigned long | num_spaces | ) | [inline, virtual] |
Implements BESInfo.
Definition at line 94 of file BESVersionInfo.h.
References BESInfo::add_space().
virtual void BESVersionInfo::add_tag | ( | const string & | tag_name, |
const string & | tag_data, | ||
map< string, string > * | attrs = 0 |
||
) | [inline, virtual] |
Implements BESInfo.
Definition at line 74 of file BESVersionInfo.h.
References BESInfo::add_tag().
Referenced by add_service().
virtual void BESVersionInfo::begin_response | ( | const string & | response_name, |
BESDataHandlerInterface & | dhi | ||
) | [inline, virtual] |
begin the informational response
basic setup of the response from abstract class
response_name | name of the response this information represents |
dhi | information about the request and response |
Reimplemented from BESInfo.
Definition at line 64 of file BESVersionInfo.h.
References BESInfo::begin_response().
Referenced by BESVersionResponseHandler::execute().
virtual void BESVersionInfo::begin_tag | ( | const string & | tag_name, |
map< string, string > * | attrs = 0 |
||
) | [inline, virtual] |
Reimplemented from BESInfo.
Definition at line 80 of file BESVersionInfo.h.
References BESInfo::begin_tag().
Referenced by add_service().
void BESVersionInfo::dump | ( | ostream & | strm | ) | const [virtual] |
dumps information about this object
Displays the pointer value of this instance along with information about this version information object
strm | C++ i/o stream to dump the information to |
Reimplemented from BESInfo.
Definition at line 106 of file BESVersionInfo.cc.
References BESInfo::dump(), BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().
virtual void BESVersionInfo::end_response | ( | ) | [inline, virtual] |
Reimplemented from BESInfo.
Definition at line 69 of file BESVersionInfo.h.
References BESInfo::end_response().
Referenced by BESVersionResponseHandler::execute().
virtual void BESVersionInfo::end_tag | ( | const string & | tag_name | ) | [inline, virtual] |
Reimplemented from BESInfo.
Definition at line 85 of file BESVersionInfo.h.
References BESInfo::end_tag().
Referenced by add_service().
virtual bool BESInfo::is_buffered | ( | ) | [inline, virtual, inherited] |
return whether the information is to be buffered or not.
Definition at line 123 of file BESInfo.h.
References BESInfo::_buffered.
Referenced by BESBasicTransmitter::send_html(), BESBasicHttpTransmitter::send_html(), BESBasicTransmitter::send_text(), and BESBasicHttpTransmitter::send_text().
virtual void BESVersionInfo::print | ( | ostream & | strm | ) | [inline, virtual] |
print the information from this informational object to the specified stream
If the information was not buffered then this method does nothing, otherwise the information is output to the specified ostream.
strm | output to this file descriptor if information buffered. |
Reimplemented from BESInfo.
Definition at line 116 of file BESVersionInfo.h.
References BESInfo::print().
virtual void BESVersionInfo::transmit | ( | BESTransmitter * | transmitter, |
BESDataHandlerInterface & | dhi | ||
) | [inline, virtual] |
transmit the informational object
The derived informational object knows how it needs to be transmitted. Does it need to be sent as html? As text? As something else?
transmitter | The type of transmitter to use to transmit the info |
dhi | information to help with the transmission |
Implements BESInfo.
Definition at line 111 of file BESVersionInfo.h.
References BESInfo::transmit().
Referenced by BESVersionResponseHandler::transmit().
bool BESInfo::_buffered [protected, inherited] |
Definition at line 73 of file BESInfo.h.
Referenced by BESTextInfo::add_data(), BESHTMLInfo::add_data(), BESInfo::BESInfo(), BESInfo::dump(), BESInfo::is_buffered(), and BESInfo::print().
string BESInfo::_response_name [protected, inherited] |
Definition at line 77 of file BESInfo.h.
Referenced by BESXMLInfo::add_tag(), BESXMLInfo::begin_response(), BESInfo::begin_response(), BESXMLInfo::begin_tag(), BESInfo::dump(), BESXMLInfo::end_response(), and BESXMLInfo::end_tag().
bool BESInfo::_response_started [protected, inherited] |
Definition at line 74 of file BESInfo.h.
Referenced by BESInfo::begin_response(), BESInfo::dump(), and BESInfo::end_response().
ostream* BESInfo::_strm [protected, inherited] |
Definition at line 71 of file BESInfo.h.
Referenced by BESTextInfo::add_data(), BESHTMLInfo::add_data(), BESInfo::BESInfo(), BESXMLInfo::end_tag(), BESInfo::print(), and BESInfo::~BESInfo().
bool BESInfo::_strm_owned [protected, inherited] |
Definition at line 72 of file BESInfo.h.
Referenced by BESInfo::BESInfo(), and BESInfo::~BESInfo().
stack<string> BESInfo::_tags [protected, inherited] |
Definition at line 76 of file BESInfo.h.
Referenced by BESInfo::begin_tag(), BESInfo::dump(), BESInfo::end_response(), and BESInfo::end_tag().