bes  Updated for version 3.20.6
BESDapErrorInfo Class Reference

silent informational response object More...

#include <BESDapErrorInfo.h>

Collaboration diagram for BESDapErrorInfo:
Collaboration 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 std::string &s)
 add data to the informational object More...
 
virtual void add_data_from_file (const std::string &key, const std::string &name)
 ignore data from a file to the informational object. More...
 
virtual void add_exception (BESError &e, const std::string &admin)
 ignore exception data to this informational object. More...
 
virtual void add_space (unsigned long num_spaces)
 add a space to the informational response More...
 
virtual void add_tag (const std::string &tag_name, const std::string &tag_data, std::map< std::string, std::string > *attrs=0)
 add tagged information to the informational response More...
 
virtual void begin_response (const std::string &response_name, BESDataHandlerInterface &dhi)
 begin the informational response More...
 
virtual void begin_response (const std::string &response_name, std::map< std::string, std::string > *attrs, BESDataHandlerInterface &dhi)
 begin the informational response More...
 
virtual void begin_tag (const std::string &tag_name, std::map< std::string, std::string > *attrs=0)
 begin a tagged part of the information, information to follow More...
 
 BESDapErrorInfo (ErrorCode ec, const std::string &msg)
 
virtual void dump (std::ostream &strm) const
 dumps information about this object More...
 
virtual void end_response ()
 
virtual void end_tag (const std::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 (std::ostream &strm)
 ignore printing the information More...
 
virtual void transmit (BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
 transmit this informational object More...
 

Protected Attributes

bool _buffered
 
std::string _response_name
 
bool _response_started
 
std::ostream * _strm
 
bool _strm_owned
 
std::stack< std::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 50 of file BESDapErrorInfo.h.

Member Function Documentation

◆ add_break()

void BESDapErrorInfo::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 line breaks to add

Implements BESInfo.

Definition at line 119 of file BESDapErrorInfo.cc.

◆ add_data()

void BESDapErrorInfo::add_data ( const std::string &  s)
virtual

add data to the informational object

because this is a silent response, nothing is added

Parameters
sinformation to be ignored

Reimplemented from BESInfo.

Definition at line 99 of file BESDapErrorInfo.cc.

◆ add_data_from_file()

void BESDapErrorInfo::add_data_from_file ( const std::string &  key,
const std::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 129 of file BESDapErrorInfo.cc.

◆ add_exception()

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

ignore exception data to this informational object.

Parameters
eexception to be added
adminThe contact information for the person responsible for this error

Reimplemented from BESInfo.

Definition at line 139 of file BESDapErrorInfo.cc.

◆ add_space()

void BESDapErrorInfo::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 109 of file BESDapErrorInfo.cc.

◆ add_tag()

void BESDapErrorInfo::add_tag ( const std::string &  tag_name,
const std::string &  tag_data,
std::map< std::string, std::string > *  attrs = 0 
)
virtual

add tagged information to the informational response

Parameters
tag_namename of the tag to add to the informational response
tag_datainformation describing the tag
attrsmap of attributes to add to the tag

Implements BESInfo.

Definition at line 68 of file BESDapErrorInfo.cc.

◆ begin_response() [1/2]

void BESDapErrorInfo::begin_response ( const std::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 57 of file BESDapErrorInfo.cc.

◆ begin_response() [2/2]

void BESInfo::begin_response ( const std::string &  response_name,
std::map< std::string, std::string > *  attrs,
BESDataHandlerInterface dhi 
)
virtualinherited

begin the informational response

basic setup of the response from abstract class

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

Reimplemented in BESXMLInfo.

Definition at line 111 of file BESInfo.cc.

◆ begin_tag()

void BESDapErrorInfo::begin_tag ( const std::string &  tag_name,
std::map< std::string, std::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 77 of file BESDapErrorInfo.cc.

◆ dump()

void BESDapErrorInfo::dump ( std::ostream &  strm) const
virtual

dumps information about this object

Displays the pointer value of this instance and calls dump on the parent class

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

Reimplemented from BESInfo.

Definition at line 172 of file BESDapErrorInfo.cc.

◆ end_tag()

void BESDapErrorInfo::end_tag ( const std::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 88 of file BESDapErrorInfo.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 111 of file BESInfo.h.

◆ print()

void BESDapErrorInfo::print ( std::ostream &  strm)
virtual

ignore printing the information

Parameters
strmstream to send output to if not ignored.

Reimplemented from BESInfo.

Definition at line 159 of file BESDapErrorInfo.cc.

◆ transmit()

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

transmit this informational object

transmit this as text to the transmitter

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

Implements BESInfo.

Definition at line 150 of file BESDapErrorInfo.cc.


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