PTLib
Version 2.10.4
|
This class describes a HyperText markup Language string as used by the World Wide Web and the PURL
and PHTTP
class.
More...
#include <html.h>
This class describes a HyperText markup Language string as used by the World Wide Web and the PURL
and PHTTP
class.
All of the standard stream I/O operators, manipulators etc will operate on the PString class.
enum PHTML::BorderCodes |
enum PHTML::CheckedCodes |
enum PHTML::DisableCodes |
enum PHTML::ElementInSet |
PHTML::PHTML | ( | ElementInSet | initialState = NumElementsInSet | ) |
Construct a new HTML object.
If a title is specified in the constructor then the HEAD, TITLE and BODY elements are output and the string is used in a H1 element.
PHTML::PHTML | ( | const char * | cstr | ) |
cstr | C string representation of the title string. |
PHTML::PHTML | ( | const PString & | str | ) |
str | String representation of the title string. |
PHTML::~PHTML | ( | ) |
virtual void PHTML::AssignContents | ( | const PContainer & | c | ) | [protected, virtual] |
Copy the container contents.
This copies the contents from one reference to another.
No duplication of contents occurs, for instance if the container is an array, the pointer to the array memory is copied, not the array memory block itself.
This function will get called by the base assignment operator.
Reimplemented from PStringStream.
Referenced by operator=().
void PHTML::Clr | ( | ElementInSet | elmt | ) |
PBoolean PHTML::Is | ( | ElementInSet | elmt | ) | const |
Restart the HTML string output using the specified value as the new title.
If title
is empty then no HEAD or TITLE elements are placed into the HTML.
html | HTML stream to make a copy of. |
References AssignContents().
Assign the string to the current object.
The current instance then becomes another reference to the same string in the str
parameter.
This will reset the read pointer for input to the beginning of the string. Also, any data output to the string up until the asasignement will be lost.
str | String for title in restating HTML. |
Reimplemented from PStringStream.
References AssignContents().
PHTML& PHTML::operator= | ( | const char * | cstr | ) | [inline] |
Assign the C string to the string stream.
The current instance then becomes a unique reference to a copy of the cstr
parameter. The cstr
parameter is typically a literal string, eg:
myStr = "fred";
This will reset the read pointer for input to the beginning of the string. Also, any data output to the string up until the asasignement will be lost.
cstr | String for title in restating HTML. |
Reimplemented from PStringStream.
References AssignContents(), and PString::PString().
PHTML& PHTML::operator= | ( | char | ch | ) | [inline] |
Assign the character to the current object.
The current instance then becomes a unique reference to a copy of the character parameter. eg:
myStr = 'A';
ch | String for title in restating HTML. |
Reimplemented from PStringStream.
References AssignContents(), and PString::PString().
void PHTML::Set | ( | ElementInSet | elmt | ) |
void PHTML::Toggle | ( | ElementInSet | elmt | ) |