34 #pragma implementation 40 using std::ostringstream ;
66 :
BESInfo( key, strm, strm_owned ),
92 add_data( (
string)
"<TITLE>" + response_name +
"</TITLE>\n" ) ;
93 if( _indent.length() >= 4 )
94 _indent = _indent.substr( 0, _indent.length()-4 ) ;
110 if( _indent.length() >= 4 )
111 _indent = _indent.substr( 0, _indent.length()-4 ) ;
113 if( _indent.length() >= 4 )
114 _indent = _indent.substr( 0, _indent.length()-4 ) ;
126 const string &tag_data,
127 map<string,string> *attrs )
129 string to_add = tag_name +
": " + tag_data +
"<BR />\n" ;
133 map<string,string>::const_iterator i = attrs->begin() ;
134 map<string,string>::const_iterator e = attrs->end() ;
137 string name = (*i).first ;
138 string val = (*i).second ;
151 map<string,string> *attrs )
154 string to_add = tag_name +
"<BR />\n" ;
159 map<string,string>::const_iterator i = attrs->begin() ;
160 map<string,string>::const_iterator e = attrs->end() ;
163 string name = (*i).first ;
164 string val = (*i).second ;
180 if( _indent.length() >= 4 )
181 _indent = _indent.substr( 0, _indent.length()-4 ) ;
192 for(
unsigned long i = 0; i < num_spaces; i++ )
208 for(
unsigned long i = 0; i < num_breaks; i++ )
252 string newkey = key +
".HTML" ;
282 << (
void *)
this <<
")" << endl ;
virtual void dump(ostream &strm) const
dumps information about this object
virtual void dump(ostream &strm) const
Displays debug information about this object.
BESHTMLInfo()
constructs an html formatted information response object.
virtual void add_data_from_file(const string &key, const string &name)
add data from a file to the informational object.
static BESInfo * BuildHTMLInfo(const string &info_type)
virtual void end_response()
end the response
virtual void add_space(unsigned long num_spaces)
add a space to the informational response
informational response object
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_tag(const string &tag_name, const string &tag_data, map< string, string > *attrs=0)
add tagged information to the inforamtional response
static void set_mime_html(ostream &strm)
Generate an HTTP 1.0 response header for a html document.
virtual void begin_tag(const string &tag_name, map< string, string > *attrs=0)
static ostream & LMarg(ostream &strm)
virtual void add_data(const string &s)
add data to this informational object.
virtual void add_break(unsigned long num_breaks)
add a line break to the information
virtual void end_tag(const string &tag_name)
end a tagged part of the informational response
Structure storing information used by the BES to handle the request.
virtual void add_data_from_file(const string &key, const string &name)
add data from a file to the informational object
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 send_html(BESInfo &info, BESDataHandlerInterface &dhi)=0
virtual void end_tag(const string &tag_name)
virtual void transmit(BESTransmitter *transmitter, BESDataHandlerInterface &dhi)
transmit the text information as text
virtual void begin_response(const string &response_name, BESDataHandlerInterface &dhi)
begin the informational response