bes  Updated for version 3.19.1
BESSilentInfo Class Reference

silent informational response object More...

#include <BESSilentInfo.h>

Inheritance diagram for BESSilentInfo:
Inheritance graph

Public Member Functions

virtual void add_break (unsigned long num_breaks)
 add a line break to the information More...
 
virtual void add_data (const string &s)
 add data to the inforamtional object More...
 
virtual void add_data_from_file (const string &key, const string &name)
 ignore data from a file to the informational object. More...
 
virtual void add_exception (BESError &e, const string &admin)
 ignore exception data to this informational object. If buffering is not set then the information is output directly to the output stream. More...
 
virtual void add_space (unsigned long num_spaces)
 add a space to the informational response More...
 
virtual void add_tag (const string &tag_name, const string &tag_data, map< string, string > *attrs=0)
 add tagged information to the inforamtional response More...
 
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)
 begin a tagged part of the information, information to follow More...
 
 BESSilentInfo ()
 constructs an informational object that doesn't write any output to the stream 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)
 end a tagged part of the informational response More...
 
virtual bool is_buffered ()
 return whether the information is to be buffered or not. More...
 
virtual void print (ostream &strm)
 printg this informational object More...
 
virtual void transmit (BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
 transmit this informational object More...
 

Protected Attributes

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

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::BESSilentInfo ( )

constructs an informational object that doesn't write any output to the stream

Definition at line 38 of file BESSilentInfo.cc.

Member Function Documentation

◆ add_break()

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
num_breaksnumber of breaks to be added

Implements BESInfo.

Definition at line 127 of file BESSilentInfo.cc.

◆ add_data()

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

add data to the inforamtional object

because this is a silent response, nothing is added

Parameters
sinformation to be ignored

Reimplemented from BESInfo.

Definition at line 105 of file BESSilentInfo.cc.

◆ add_data_from_file()

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

ignore data from a file to the informational object.

Parameters
keyKey from the initialization file specifying the file to be
namenaem information to add to error messages loaded.

Reimplemented from BESInfo.

Definition at line 138 of file BESSilentInfo.cc.

◆ add_exception()

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

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

Parameters
ethe exception to be added to this informational object
adminThe contact information for the person responsible for this error
See also
BESError

Reimplemented from BESInfo.

Definition at line 151 of file BESSilentInfo.cc.

◆ add_space()

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_spacesnumber of spaces to add

Implements BESInfo.

Definition at line 116 of file BESSilentInfo.cc.

◆ add_tag()

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_namename of the tag to add to the infroamtional response
tag_datainformation describing the tag
attrsmap of attributes to add to the tag

Implements BESInfo.

Definition at line 68 of file BESSilentInfo.cc.

◆ begin_response()

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

begin the informational response

Because this is silent, there is nothing to do

Parameters
response_namename of the response represented by the information
dhiinformation about the request and response

Reimplemented from BESInfo.

Definition at line 55 of file BESSilentInfo.cc.

◆ begin_tag()

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_namename of the tag to begin
attrsmap of attributes to begin the tag with

Reimplemented from BESInfo.

Definition at line 80 of file BESSilentInfo.cc.

◆ dump()

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

dumps information about this object

Displays the pointer value of this instance

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

Reimplemented from BESInfo.

Definition at line 186 of file BESSilentInfo.cc.

◆ end_tag()

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_namename of the tag to end

Reimplemented from BESInfo.

Definition at line 93 of file BESSilentInfo.cc.

◆ is_buffered()

virtual bool BESInfo::is_buffered ( )
inlinevirtualinherited

return whether the information is to be buffered or not.

Returns
true if information is buffered, false if not

Definition at line 123 of file BESInfo.h.

◆ print()

void BESSilentInfo::print ( ostream &  strm)
virtual

printg this informational object

Nothing is to be printed as this is a silent object

Parameters
strmstream to send output to if not ignored.

Reimplemented from BESInfo.

Definition at line 175 of file BESSilentInfo.cc.

◆ transmit()

void BESSilentInfo::transmit ( BESTransmitter transmitter,
BESDataHandlerInterface dhi 
)
virtual

transmit this informational object

Nothing is to be transmotted as this is silent

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

Implements BESInfo.

Definition at line 163 of file BESSilentInfo.cc.


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