#include <BESInfo.h>
Inheritance diagram for BESInfo:
Public Member Functions | |
BESInfo () | |
constructs a BESInfo object | |
BESInfo (const string &buffered_key) | |
constructs a BESInfo object | |
virtual | ~BESInfo () |
virtual void | begin_response (const string &response_name) |
virtual void | end_response () |
virtual void | add_tag (const string &tag_name, const string &tag_data, map< string, string > *attrs=0)=0 |
virtual void | begin_tag (const string &tag_name, map< string, string > *attrs=0) |
virtual void | end_tag (const string &tag_name) |
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. | |
virtual void | add_space (unsigned long num_spaces)=0 |
virtual void | add_break (unsigned long num_breaks)=0 |
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 (BESException &e) |
add exception information to this informational object | |
virtual void | transmit (BESTransmitter *transmitter, BESDataHandlerInterface &dhi)=0 |
transmit the informational object | |
virtual void | print (FILE *out) |
print the information from this informational object to the specified FILE descriptor | |
virtual bool | set_buffered (bool buffered) |
return whether the information is to be buffered or not. | |
virtual bool | is_buffered () |
return whether the information is to be buffered or not. | |
virtual void | dump (ostream &strm) const |
Displays debug information about this object. | |
Protected Attributes | |
ostream * | _strm |
bool | _buffered |
bool | _response_started |
stack< string > | _tags |
string | _response_name |
This class provides a means to store informational responses, such as help information and version information. The retrieval of this information can be buffered until all information is retrieved, or can be directly output thereby not using memory resources.
Information is added to this response object through the add_data method and then output using the print method. If the information is not buffered then the information is output during the add_data processing, otherwise the print method performs the output.
This class is can not be directly created but simply provides a base class implementation of BESResponseObject for simple informational responses.
|
constructs a BESInfo object By default, informational responses are buffered, so the output stream is created |
|
constructs a BESInfo object If the passed key is set to true, True, TRUE, yes, Yes, or YES then the information will be buffered, otherwise it will not be buffered. If the information is not to be buffered then the output stream is set to standard output. |
|
|
|
Implemented in BESHTMLInfo, BESSilentInfo, BESTextInfo, BESVersionInfo, and BESXMLInfo. |
|
add data to this informational object. If buffering is not set then the information is output directly to the output stream.
Reimplemented in BESHTMLInfo, BESSilentInfo, BESTextInfo, BESVersionInfo, and BESXMLInfo. |
|
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.
Reimplemented in BESHTMLInfo, BESSilentInfo, BESTextInfo, BESVersionInfo, and BESXMLInfo. |
|
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.
Reimplemented in BESSilentInfo, and BESVersionInfo. |
|
Implemented in BESHTMLInfo, BESSilentInfo, BESTextInfo, BESVersionInfo, and BESXMLInfo. |
|
Implemented in BESHTMLInfo, BESSilentInfo, BESTextInfo, BESVersionInfo, and BESXMLInfo. |
|
Reimplemented in BESHTMLInfo, BESSilentInfo, BESTextInfo, BESVersionInfo, and BESXMLInfo. |
|
Reimplemented in BESHTMLInfo, BESSilentInfo, BESTextInfo, BESVersionInfo, and BESXMLInfo. |
|
Displays debug information about this object.
Implements BESResponseObject. Reimplemented in BESHTMLInfo, BESSilentInfo, BESTextInfo, BESVersionInfo, and BESXMLInfo. |
|
Reimplemented in BESHTMLInfo, BESVersionInfo, and BESXMLInfo. |
|
Reimplemented in BESHTMLInfo, BESSilentInfo, BESTextInfo, BESVersionInfo, and BESXMLInfo. |
|
return whether the information is to be buffered or not.
|
|
print the information from this informational object to the specified FILE descriptor If the information was not buffered then this method does nothing, otherwise the information is output to the specified FILE descriptor.
Reimplemented in BESSilentInfo, BESVersionInfo, and BESXMLInfo. |
|
return whether the information is to be buffered or not.
|
|
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?
Implemented in BESHTMLInfo, BESSilentInfo, BESTextInfo, BESVersionInfo, and BESXMLInfo. |
|
|
|
|
|
|
|
|
|
|