html::compound Class Reference
[Html Document preparation]

#include <compound.hh>

Inheritance diagram for html::compound:

html::object html::block html::cell html::document html::link

List of all members.

Public Member Functions

 compound (void)
 compound (const compound &x)
virtual ~compound (void)
virtual void write (writer &out) const
virtual compoundclone (void) const
virtual const char * getTag (void) const
objectaddObject (const object &thing)
objectaddObject (object *thing)
objectback (void)
const objectback (void) const
objectfront (void)
const objectfront (void) const
objectlineBreak (void)
void clear (void)
void remObject (const object *thing)
void addAttr (const std::string &name, const attrib &a)
void clearAttr (void)
void repAttr (const std::string &name, const attrib &a)
void remAttr (const std::string &name)


Detailed Description

Compound objects are HTML object containing one of more simple or compound sub-objects. In addition to a list of constituent objects, the compound object contains an attribute list that is valid through the scope of the compound. brief Compound object container.
Author:
John Zweizig
Version:
1.1; Modified January 17, 2007

Constructor & Destructor Documentation

html::compound::compound ( void   ) 

Construct an empty compound. brief Null constructor.

html::compound::compound ( const compound x  ) 

Construct a compound that is identical to the argument. All constituents of the argument are cloned and added into the new compound. brief Copy constructor.

Parameters:
x compound to be copied.

virtual html::compound::~compound ( void   )  [virtual]

Destroy the compound object and all its constituent objects. brief Compound destructor.


Member Function Documentation

virtual void html::compound::write ( writer out  )  const [virtual]

Set the compound scope attributes and Write out all the consituent objects. brief Write the compound.

Parameters:
out HTML writer to receive the compound and its constituents.

Reimplemented from html::object.

Reimplemented in html::document.

virtual compound* html::compound::clone ( void   )  const [virtual]

A new compound object is created from clones of all attributes and constituent objects found in the original. brief clone the compound object

Returns:
pointer to the clone.

Implements html::object.

Reimplemented in html::block, html::document, html::link, and html::cell.

virtual const char* html::compound::getTag ( void   )  const [virtual]

Get the tag name to be used to describe this compound object. brief Get the compound tag name.

Returns:
Pointer to a character string containing the tag name.

Reimplemented in html::block, html::document, html::link, and html::cell.

html::object & html::compound::addObject ( const object thing  )  [inline]

The argument object is cloned and the clone is added to the end of the compound object list. A reference to the cloned object is returned. brief Add the specified object to the compound.

Parameters:
thing Object to be added to the compound.
Returns:
Reference to the cloned object in the compound.

html::object * html::compound::addObject ( object thing  )  [inline]

The argument object is added to the end of the compound object list. Ownership of the object is taken by the compound. A pointer to the object is returned. brief Add the specified object to the compound.

Parameters:
thing Object to be added to the compound.
Returns:
Pointer to the object added to the compound.

html::object & html::compound::back ( void   )  [inline]

Get a reference to the last object in the compound object list. brief Get back object reference.

const html::object & html::compound::back ( void   )  const [inline]

Get a constant reference to the last object in the compound object list. brief Get back object reference.

html::object & html::compound::front ( void   )  [inline]

Get a reference to the first object in the compound object list. brief Get front object reference.

const html::object & html::compound::front ( void   )  const [inline]

Get a constant reference to the first object in the compound object list. brief Get front object reference.

object& html::compound::lineBreak ( void   ) 

Add a line-break marker.

void html::compound::clear ( void   ) 

Remove all objects from the constituent list. brief clear the compound.

void html::compound::remObject ( const object thing  ) 

The specified object us removed from the constitent list and deleted. brief remove a constituent object from a compound.

Parameters:
thing Pointer to the object to be removed.

void html::compound::addAttr ( const std::string &  name,
const attrib a 
) [inline]

A clone of the specified attribute is added to the compound scope attribute list with the given name. brief Add an attribute.

Parameters:
name Name of attribute to be added.
a Attribute to be added to the compound scope.

void html::compound::clearAttr ( void   ) 

Remove all attributess from the compound scope. brief clear the compound.

void html::compound::repAttr ( const std::string &  name,
const attrib a 
) [inline]

Replace the named attribute in the compound scope with a clone of the specified attribute. brief Replace an attribute.

Parameters:
name Name of attribute to be replaced.
a Replacement attribute.

void html::compound::remAttr ( const std::string &  name  )  [inline]

Remove the named attribute. brief remove the named attribute

Parameters:
name Attribute to be removed from the compound scope.


The documentation for this class was generated from the following file:
Generated on Sun Mar 8 19:21:26 2009 for dmt by  doxygen 1.5.4