36 using std::ostringstream ;
77 bool strm_owned,
bool ishttp )
78 :
BESInfo( key, strm, strm_owned ),
110 const string &tag_data,
111 map<string,string> *attrs )
113 add_data( _indent + tag_name +
": " + tag_data +
"\n" ) ;
116 map<string,string>::const_iterator i = attrs->begin() ;
117 map<string,string>::const_iterator e = attrs->end() ;
120 string name = (*i).first ;
121 string val = (*i).second ;
122 add_data( _indent +
" " + name +
": " + val +
"\n" ) ;
134 map<string,string> *attrs )
137 add_data( _indent + tag_name +
"\n" ) ;
141 map<string,string>::const_iterator i = attrs->begin() ;
142 map<string,string>::const_iterator e = attrs->end() ;
145 string name = (*i).first ;
146 string val = (*i).second ;
147 add_data( _indent + name +
": " + val +
"\n" ) ;
162 if( _indent.length() >= 4 )
163 _indent = _indent.substr( 0, _indent.length()-4 ) ;
189 for(
unsigned long i = 0; i < num_spaces; i++ )
204 for(
unsigned long i = 0; i < num_breaks; i++ )
222 string newkey = key +
".TXT" ;
252 << (
void *)
this <<
")" << endl ;
virtual void begin_response(const string &response_name, BESDataHandlerInterface &dhi)
begin the informational response
virtual void add_space(unsigned long num_spaces)
add a space to the informational 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 add_data_from_file(const string &key, const string &name)
add data from a file to the informational object.
static BESInfo * BuildTextInfo(const string &info_type)
virtual void dump(ostream &strm) const
Displays debug information about this object.
informational response object
virtual void dump(ostream &strm) const
dumps information about this object
virtual void begin_tag(const string &tag_name, map< string, string > *attrs=0)
static ostream & LMarg(ostream &strm)
virtual void add_data_from_file(const string &key, const string &name)
add data from a file to the informational object
static void set_mime_text(ostream &strm)
Generate an HTTP 1.0 response header for a text document.
virtual void add_tag(const string &tag_name, const string &tag_data, map< string, string > *attrs=0)
add tagged information to the inforamtional response
BESTextInfo(bool ishttp=false)
constructs a basic text information response object.
virtual void send_text(BESInfo &info, BESDataHandlerInterface &dhi)=0
virtual void end_tag(const string &tag_name)
end a tagged part of the informational response
virtual void add_break(unsigned long num_breaks)
add a line break to the information
Structure storing information used by the BES to handle the request.
virtual void begin_response(const string &response_name, BESDataHandlerInterface &dhi)
begin the informational response
virtual void add_data(const string &s)
add data to this informational object.
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the text information as text
virtual void end_tag(const string &tag_name)
virtual void add_data(const string &s)
add string data to the informational response