Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

cgicc::HTMLAttributeList Class Reference

An expandable list of HTMLAttribute objects. More...

#include <cgicc/HTMLAttributeList.h>

List of all members.

Public Member Functions

Constructors and Destructor
 HTMLAttributeList ()
 Create an empty HTMLAttributeList.

 HTMLAttributeList (const HTMLAttribute &head)
 Create a new HTMLAttributeList, specifying the first element.

 HTMLAttributeList (const HTMLAttributeList &list)
 Copy constructor.

 ~HTMLAttributeList ()
 Destructor.

Overloaded Operators
HTMLAttributeListoperator= (const HTMLAttributeList &list)
 Assign one HTMLAttributeList to another.

List Management
Add attributes to the list

HTMLAttributeListset (const std::string &name)
 Add an atomic HTMLAttribute to this list.

HTMLAttributeListset (const std::string &name, const std::string &value)
 Add a HTMLAttribute to this list.

Utility Methods
void render (std::ostream &out) const
 Render this HTMLAttributeList to an ostream.


Detailed Description

An expandable list of HTMLAttribute objects.

An HTMLAttributeList represents any number of HTMLAttribute objects which may be embedded in an HTMLElement. To add HTMLAttribute objects to an HTMLAttributeList, use the set() methods or functions. For example,

cgicc::HTMLAttributeList list = cgicc::set("HEIGHT", "100").set("WIDTH", "100");
generates an HTMLAttributeList with two elements.
See also:
HTMLAttribute

HTMLElement

Definition at line 67 of file HTMLAttributeList.h.


Constructor & Destructor Documentation

cgicc::HTMLAttributeList::HTMLAttributeList  ) 
 

Create an empty HTMLAttributeList.

HTMLAttributeLists are most often created with the set functions

cgicc::HTMLAttributeList::HTMLAttributeList const HTMLAttribute head  ) 
 

Create a new HTMLAttributeList, specifying the first element.

The first attribute in the list is set to head

Parameters:
head The first element of the list

cgicc::HTMLAttributeList::HTMLAttributeList const HTMLAttributeList list  ) 
 

Copy constructor.

Sets the elements in this list to those in list

Parameters:
list The HTMLAttributeList to copy.

cgicc::HTMLAttributeList::~HTMLAttributeList  ) 
 

Destructor.

Delete this HTMLAttributeList object


Member Function Documentation

HTMLAttributeList& cgicc::HTMLAttributeList::operator= const HTMLAttributeList list  ) 
 

Assign one HTMLAttributeList to another.

Sets the elements in this list to those in list

Parameters:
list The HTMLAttributeList to copy

void cgicc::HTMLAttributeList::render std::ostream &  out  )  const
 

Render this HTMLAttributeList to an ostream.

This is used for output

Parameters:
out The ostream to which to write

HTMLAttributeList& cgicc::HTMLAttributeList::set const std::string &  name,
const std::string &  value
 

Add a HTMLAttribute to this list.

For a list of possible attributes see http://www.w3.org/TR/REC-html40/

Parameters:
name The name of the HTMLAttribute to set.
value The value of the HTMLAttribute to set.
Returns:
A reference to this

HTMLAttributeList& cgicc::HTMLAttributeList::set const std::string &  name  ) 
 

Add an atomic HTMLAttribute to this list.

isindex is an example of an atomic attribute.

Parameters:
name The name of the HTMLAttribute to set.
Returns:
A reference to this


The documentation for this class was generated from the following file:
GNU cgicc - A C++ class library for writing CGI applications
Copyright © 1996 - 2004 Stephen F. Booth
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front Cover Texts, and with no Back-Cover Texts.
Documentation generated Sat Jun 19 00:36:24 2004 for cgicc by doxygen 1.3.6