Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #ifndef BESInfo_h_
00034 #define BESInfo_h_ 1
00035
00036 #include <string>
00037 #include <ostream>
00038 #include <stack>
00039 #include <map>
00040
00041 using std::string ;
00042 using std::ostream ;
00043 using std::stack ;
00044 using std::map ;
00045
00046 #include "BESResponseObject.h"
00047 #include "BESDataHandlerInterface.h"
00048 #include "BESTransmitter.h"
00049 #include "BESError.h"
00050
00068 class BESInfo :public BESResponseObject
00069 {
00070 protected:
00071 ostream *_strm ;
00072 bool _strm_owned ;
00073 bool _buffered ;
00074 bool _response_started ;
00075
00076 stack<string> _tags ;
00077 string _response_name ;
00078
00079 public:
00080 BESInfo( ) ;
00081 BESInfo( const string &buffered_key,
00082 ostream *strm, bool strm_owned ) ;
00083 virtual ~BESInfo() ;
00084
00085 virtual void begin_response( const string &response_name,
00086 BESDataHandlerInterface &dhi ) ;
00087 virtual void end_response( ) ;
00088
00089 virtual void add_tag( const string &tag_name,
00090 const string &tag_data,
00091 map<string,string> *attrs = 0 ) = 0 ;
00092 virtual void begin_tag( const string &tag_name,
00093 map<string,string> *attrs = 0 ) ;
00094 virtual void end_tag( const string &tag_name ) ;
00095
00096 virtual void add_data( const string &s ) ;
00097 virtual void add_space( unsigned long num_spaces ) = 0 ;
00098 virtual void add_break( unsigned long num_breaks ) = 0 ;
00099
00100 virtual void add_data_from_file( const string &key,
00101 const string &name ) ;
00102
00103 virtual void add_exception( BESError &e, const string &admin ) ;
00104
00114 virtual void transmit( BESTransmitter *transmitter,
00115 BESDataHandlerInterface &dhi ) = 0 ;
00116
00117 virtual void print( ostream &strm ) ;
00118
00123 virtual bool is_buffered() { return _buffered ; }
00124
00129 virtual void dump( ostream &strm ) const ;
00130 };
00131
00132 #endif // BESInfo_h_
00133