|
htmlComment
HTML Comment class | [Previous] [Main] [Next] |
| htmlComment encapsulates HTML comment codes (e.g., <!-- ... -->). Comments are not displayed by web browsers, and are used to mark or otherwise add additional information important to the document's author. Comments are also often used by web servers to invoke server side includes.
| |
|
| |
| #include <dcmicro/htmlpp/comment.h>
| |
|
| |
|
| |
| None.
| |
|
| |
| None.
| |
|
| |
| htmlComment()
| |
| Constructs an empty object.
| |
|
| |
| htmlComment( const String& text )
| |
| Constructs an object, inserting the string text into it.
| |
|
| |
| htmlComment( const htmlComment& rhs )
| |
| Copy constructor.
| |
|
| |
| virtual ~htmlComment()
| |
| Destroys the object.
| |
|
| |
| = | htmlComment& operator= ( const htmlComment& rhs )
| |
| Replaces object contents with rhs, and returns a reference to it.
| |
|
| |
| = | htmlComment& operator= ( const String& text )
| |
| Replaces object contents with text, and returns a reference to it.
| |
|
| |
| << | htmlComment& operator<< (const String& text )
| |
| Appends text, then returns a reference to the object.
| |
|
| |
| String | operator String() const
| |
| Convert the object contents and return them as a string.
| |
|
| |
| void Print( ostream& os ) const
| ||
| Outputs the object to os.
| |
|
| |
| Clone | htmlObject FAR * Clone() const
| |
| Returns a base-class pointer to a deep copy of the object.
| |
|
| |
|
| |
| #include <stdio.h>
| |
| #include <stdlib.h>
| |
| #include <dcmicro/htmlpp/htmlpp.h>
| |
|
| |
| int main( void )
| |
| {
| |
| htmlCgi server ;
| |
| htmlPage page( "html++ example application" ) ;
| |
|
| |
| // Comments are included in the HTML output,
| |
| // but are not displayed by browsers.
| |
| page << htmlComment( "This is a test document" ) ;
| |
|
| |
| server << page ;
| |
| return 0 ;
| |
| }
| |
|
| |
|
| |
| Content-Type: text/html
| |
| <HTML>
| |
| <HEAD>
| |
| <TITLE>html++ example application</TITLE>
| |
| </HEAD>
| |
| <BODY>
| |
| <!--This is a test document-->
| |
| </BODY>
| |
| </HTML>
| |
|
| |
|
| |
|
| |
