html::attList Class Reference
[Html Document preparation]

#include <Attrib.hh>

Inheritance diagram for html::attList:

html::StyleClass html::textAttr

List of all members.

Public Types

typedef AttrList::const_iterator const_attr_iter

Public Member Functions

 attList (void)
 attList (const attList &x)
virtual ~attList (void)
attribaddAttr (const std::string &name, const attrib &a)
attribrepAttr (const std::string &name, const attrib &a)
void remAttr (const std::string &name)
void clear (void)
bool empty (void) const
bool exists (const std::string &key) const
const attribfind (const std::string &key) const
bool isDefault (void) const
virtual void putAttr (writer &w) const
virtual void setWrite (writer &w) const
virtual void merge (const attList &x)
const_attr_iter begin (void) const
const_attr_iter end (void) const


Detailed Description

An attribute list is a map associating a set of attribute names to with their appropriate values. brief Attribute list class.
Author:
J. Zweizig
Version:
1.0; Modified January 5, 2001

Member Typedef Documentation

typedef AttrList::const_iterator html::attList::const_attr_iter

Constant iterator for use in traversing the attribute list. brief Constant attribute iterator.


Constructor & Destructor Documentation

html::attList::attList ( void   ) 

Construct a null attribute list. brief Default constructor.

html::attList::attList ( const attList x  ) 

Copy an attribute list by cloning all known attributes. brief Copy constructor.

Parameters:
x Attribute list to be copied.

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

Delete all attribute values in the attribute list and clear the list. brief destructor.


Member Function Documentation

attrib& html::attList::addAttr ( const std::string &  name,
const attrib a 
)

The specified attribute value is cloned and added to the attribute list with the given name. brief Add an attribute to the list.

Parameters:
name Attribute name to be added.
a Value of attribute to be added
Returns:
reference to the attribute value entry.

attrib& html::attList::repAttr ( const std::string &  name,
const attrib a 
)

The specified attribute value is used to replace the attribute with the given name. brief Replace an attribute in the list.

Parameters:
name Attribute name to be replaced.
a Replacement attribute value.
Returns:
reference to the attribute value entry.

void html::attList::remAttr ( const std::string &  name  ) 

Remove the specified attribute from the list. brief remove an attribute.

Parameters:
name Name of attribute to be removed.

void html::attList::clear ( void   ) 

Delete and destroy all attributes from the list. brief Clear attribute list.

bool html::attList::empty ( void   )  const [inline]

Test if the list has any attributes. brief test for empty list.

Returns:
true if the list is empty.

bool html::attList::exists ( const std::string &  key  )  const

Test whether the named attribute is included in the list. brief Test if attribute exists.

Returns:
true if the named attribute is in the list.
Parameters:
key Name of attribute to search for.

const attrib& html::attList::find ( const std::string &  key  )  const

Look for the specified attribute. Return a reference if it is found. brief Find a named attribute.

Returns:
Reference to the found attribute instance.
Parameters:
key name of the attribute to be searched for.

bool html::attList::isDefault ( void   )  const

Test whether all specified attributes have their default values. brief Test for default list.

virtual void html::attList::putAttr ( writer w  )  const [virtual]

List all non-default attributes to the HTML document stream. brief List attributes.

Parameters:
w HTML document stream to receive attribute list.

Reimplemented in html::StyleClass.

virtual void html::attList::setWrite ( writer w  )  const [virtual]

Set HTML document writer to reflect any state attributes. brief Set writer attributes.

Parameters:
w Writer to modify based on attribute values.

virtual void html::attList::merge ( const attList x  )  [virtual]

Merge specified attribute list into the current list. Any attribute in the specified list that is not covered by the current list will be added to the current list. brief Merge attribute lists.

Parameters:
x List to be merged into the current list.

Reimplemented in html::textAttr.

html::attList::const_attr_iter html::attList::begin ( void   )  const [inline]

Fetch an iterator pointing to the start of the attribute list. brief List start iterator.

html::attList::const_attr_iter html::attList::end ( void   )  const [inline]

Fetch an iterator pointing to the end of the attribute list. brief List end iterator.


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