|
htmlGroup
Group container class for htmlObject-derived objects and strings | [Previous] [Main] [Next] |
| htmlGroup is the parent class for any html++ object that can contain other objects. It is derived from htmlObject, and is intended to manage groups of strings and htmlObject-derived classes.
| |
|
| |
| htmlGroup is used internally by html++ and, though not intended for direct use, defines member methods common to most html++ classes, including default assignment behavior, << and () operators, and deep removal (RemoveAllElements).
| |
|
| |
| The htmlContainer class is derived from htmlGroup, and can serve as a generic container for other html++ objects when constructing documents or document fragments in memory, without adding extra HTML tags to the output.
| |
|
| |
| #include <dcmicro/htmlpp/group.h>
| |
|
| |
|
| |
| htmlContainer
| |
|
| |
| None.
| |
|
| |
| htmlGroup( const String& tag )
| |
| Constructs an empty object using the specified HTML tag.
| |
|
| |
| htmlGroup( const String& tag, htmlObject& element )
| |
| Constructs an object using the specified HTML tag, inserting element into it.
| |
|
| |
| htmlGroup( const String& tag, String& text )
| |
| Constructs an object using the specified HTML tag, inserting text into it.
| |
|
| |
| htmlGroup( const htmlGroup& rhs )
| |
| Copy Constructor.
| |
|
| |
| virtual ~htmlGroup()
| |
| Destroys the object.
| |
|
| |
| = | htmlGroup& operator= (const htmlGroup& rhs )
| |
| Replaces group contents with a copy of rhs and returns a reference to the group.
| |
|
| |
| = | htmlGroup& operator= (const htmlObject& element )
| |
| Performs a deep removal of all elements in the group, then adds a copy of element. The identity of the group object is unchanged (e.g., if the object is an htmlTable object it remains a table object). A reference to the group is returned.
| |
|
| |
| = | htmlGroup& operator= (const String& text )
| |
| = | htmlGroup& operator= (const char * text )
| |
| Performs a deep removal of all elements in the group, then adds a copy of text. The identity of the group object is unchanged (e.g., if the object is an htmlTable object it remains a table object). A reference to the group is returned.
| |
|
| |
| << | htmlGroup& operator<< ( const htmlObject& element )
| |
| Adds the element object to the group and returns a reference to the group. This method uses the virtual Add() method.
| |
|
| |
| << | htmlGroup& operator<< ( const String& text )
| |
| Adds the text string to the group and returns a reference to the group. This method uses the virtual Add() method.
| |
|
| |
| ( ) | htmlGroup& operator() ( const htmlObject& element )
| |
| Performs a deep removal of all elements in the group, then adds a copy of element, returning a reference to the group. This is particularly useful to perform inline replacement of an object's contents, such as when replacing the text contents of a predefined htmlFont object. This method uses the virtual Add() method.
| |
|
| |
| ( ) | htmlGroup& operator() ( const String& text )
| |
| Performs a deep removal of all elements in the group, then adds a copy of text, returning a reference to the group. This method uses the virtual Add() method.
| |
|
| |
| Add | virtual htmlObject FAR * Add( const htmlObject& element )
| |
| Adds the element object to the group and returns a pointer to the new element.
| |
|
| |
| Add | virtual htmlObject FAR * Add( const String& text )
| |
| Adds the text string to the group and returns a pointer to the new element.
| |
|
| |
| RemoveAllElements | htmlGroup& RemoveAllElements()
| |
| Performs deep removal of all element objects in the group, then returns a reference to the empty group. This method is often useful for re-using objects within loops.
| |
|
| |
| 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.
| |
|
| |
| This class is not intended for direct use.
| |
|
| |
