BESSilentInfo Class Reference

silent informational response object More...

#include <BESSilentInfo.h>

Inheritance diagram for BESSilentInfo:

Inheritance graph
[legend]
Collaboration diagram for BESSilentInfo:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 BESSilentInfo ()
 constructs a BESSilentInfo object for the specified type.
virtual ~BESSilentInfo ()
virtual void begin_response (const string &response_name)
 begin the informational response
virtual void add_tag (const string &tag_name, const string &tag_data, map< string, string > *attrs=0)
 add tagged information to the inforamtional response
virtual void begin_tag (const string &tag_name, map< string, string > *attrs=0)
 begin a tagged part of the information, information to follow
virtual void end_tag (const string &tag_name)
 end a tagged part of the informational response
virtual void add_data (const string &s)
 add data to the inforamtional object
virtual void add_space (unsigned long num_spaces)
 add a space to the informational response
virtual void add_break (unsigned long num_breaks)
 add a line break to the information
virtual void add_data_from_file (const string &key, const string &name)
 ignore data from a file to the informational object.
virtual void add_exception (BESException &e)
 ignore exception data to this informational object. If buffering is not set then the information is output directly to the output stream.
virtual void transmit (BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
 transmit the informational object
virtual void print (ostream &strm)
 ignore printing the information
virtual void dump (ostream &strm) const
 dumps information about this object
virtual void end_response ()
virtual bool is_buffered ()
 return whether the information is to be buffered or not.

Protected Attributes

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


Detailed Description

silent informational response object

This class ignores any data added to an informational object and ignores the print command. Basically, it is silent!

See also:
BESResponseObject

Definition at line 49 of file BESSilentInfo.h.


Constructor & Destructor Documentation

BESSilentInfo::BESSilentInfo (  ) 

constructs a BESSilentInfo object for the specified type.

Parameters:
otype type of data represented by this response object

Definition at line 39 of file BESSilentInfo.cc.

BESSilentInfo::~BESSilentInfo (  )  [virtual]

Definition at line 44 of file BESSilentInfo.cc.


Member Function Documentation

void BESSilentInfo::begin_response ( const string &  response_name  )  [virtual]

begin the informational response

Because this is silent, there is nothing to do

Parameters:
response_name name of the response represented by the information

Reimplemented from BESInfo.

Definition at line 55 of file BESSilentInfo.cc.

References BESInfo::begin_response().

Here is the call graph for this function:

void BESSilentInfo::add_tag ( const string &  tag_name,
const string &  tag_data,
map< string, string > *  attrs = 0 
) [virtual]

add tagged information to the inforamtional response

Parameters:
tag_name name of the tag to add to the infroamtional response
tag_data information describing the tag

Implements BESInfo.

Definition at line 66 of file BESSilentInfo.cc.

void BESSilentInfo::begin_tag ( const string &  tag_name,
map< string, string > *  attrs = 0 
) [virtual]

begin a tagged part of the information, information to follow

Parameters:
tag_name name of the tag to begin

Reimplemented from BESInfo.

Definition at line 77 of file BESSilentInfo.cc.

References BESInfo::begin_tag().

Here is the call graph for this function:

void BESSilentInfo::end_tag ( const string &  tag_name  )  [virtual]

end a tagged part of the informational response

If the named tag is not the current tag then an error is thrown.

Parameters:
tag_name name of the tag to end

Reimplemented from BESInfo.

Definition at line 90 of file BESSilentInfo.cc.

References BESInfo::end_tag().

Here is the call graph for this function:

void BESSilentInfo::add_data ( const string &  s  )  [virtual]

add data to the inforamtional object

because this is a silent response, nothing is added

Parameters:
s information to be ignored

Reimplemented from BESInfo.

Definition at line 102 of file BESSilentInfo.cc.

void BESSilentInfo::add_space ( unsigned long  num_spaces  )  [virtual]

add a space to the informational response

because this is a silent response, nothing is added

Parameters:
num_spaces number of spaces to add

Implements BESInfo.

Definition at line 113 of file BESSilentInfo.cc.

void BESSilentInfo::add_break ( unsigned long  num_breaks  )  [virtual]

add a line break to the information

because this is a silent response, nothing is added

Parameters:
s information to be ignored

Implements BESInfo.

Definition at line 124 of file BESSilentInfo.cc.

void BESSilentInfo::add_data_from_file ( const string &  key,
const string &  name 
) [virtual]

ignore data from a file to the informational object.

Parameters:
key Key from the initialization file specifying the file to be
name naem information to add to error messages loaded.

Reimplemented from BESInfo.

Definition at line 135 of file BESSilentInfo.cc.

void BESSilentInfo::add_exception ( BESException e  )  [virtual]

ignore exception data to this informational object. If buffering is not set then the information is output directly to the output stream.

Parameters:
type type of the exception received
msg the error message
file file name of where the error was sent
line line number in the file where the error was sent

Reimplemented from BESInfo.

Definition at line 148 of file BESSilentInfo.cc.

void BESSilentInfo::transmit ( BESTransmitter transmitter,
BESDataHandlerInterface dhi 
) [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?

Parameters:
transmitter The type of transmitter to use to transmit the info
dhi information to help with the transmission

Implements BESInfo.

Definition at line 153 of file BESSilentInfo.cc.

void BESSilentInfo::print ( ostream &  strm  )  [virtual]

ignore printing the information

Parameters:
strm stream to send output to if not ignored.

Reimplemented from BESInfo.

Definition at line 163 of file BESSilentInfo.cc.

void BESSilentInfo::dump ( ostream &  strm  )  const [virtual]

dumps information about this object

Displays the pointer value of this instance

Parameters:
strm C++ i/o stream to dump the information to

Reimplemented from BESInfo.

Definition at line 174 of file BESSilentInfo.cc.

References BESInfo::dump(), BESIndent::Indent(), BESIndent::LMarg(), and BESIndent::UnIndent().

Here is the call graph for this function:

void BESInfo::end_response (  )  [virtual, inherited]

Reimplemented in BESHTMLInfo, BESVersionInfo, and BESXMLInfo.

Definition at line 115 of file BESInfo.cc.

References BESInfo::_response_started, and BESInfo::_tags.

Referenced by BESXMLInfo::end_response(), BESVersionInfo::end_response(), BESStatusResponseHandler::execute(), BESShowDefsResponseHandler::execute(), BESShowContextResponseHandler::execute(), BESShowContainersResponseHandler::execute(), BESProcIdResponseHandler::execute(), BESKeysResponseHandler::execute(), BESHelpResponseHandler::execute(), BESCatalogResponseHandler::execute(), BESExceptionManager::handle_exception(), TestException::handleException(), and infoT::run().

virtual bool BESInfo::is_buffered (  )  [inline, virtual, inherited]

return whether the information is to be buffered or not.

Returns:
true if information is buffered, false if not

Definition at line 122 of file BESInfo.h.

References BESInfo::_buffered.

Referenced by BESFilterTransmitter::send_html(), BESBasicHttpTransmitter::send_html(), BESFilterTransmitter::send_text(), and BESBasicHttpTransmitter::send_text().


Member Data Documentation

ostream* BESInfo::_strm [protected, inherited]

Definition at line 71 of file BESInfo.h.

Referenced by BESTextInfo::add_data(), BESHTMLInfo::add_data(), BESInfo::BESInfo(), 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().

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().

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().

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().

string BESInfo::_response_name [protected, inherited]

Definition at line 77 of file BESInfo.h.

Referenced by BESXMLInfo::begin_response(), BESInfo::begin_response(), BESInfo::dump(), and BESXMLInfo::end_response().


The documentation for this class was generated from the following files:
Generated on Wed Jan 2 06:04:21 2008 for OPeNDAP Back End Server (BES) by  doxygen 1.5.4