List of all members
cgicc::HTMLAttributeList Class Reference

An expandable list of HTMLAttribute objects. More...

`#include <cgicc/HTMLAttributeList.h>`

## Public Member Functions
Constructors and Destructor
| HTMLAttributeList ()
| Create an empty HTMLAttributeList. More...
| HTMLAttributeList (const HTMLAttribute &head)
| Create a new HTMLAttributeList, specifying the first element. More...
| HTMLAttributeList (const HTMLAttributeList &list)
| Copy constructor. More...
| ~HTMLAttributeList ()
| Destructor. More...
Overloaded Operators
HTMLAttributeList & | operator= (const HTMLAttributeList &list)
| Assign one HTMLAttributeList to another. More...
List Management
Add attributes to the list
HTMLAttributeList & | set (const std::string &name)
| Add an atomic HTMLAttribute to this list. More...
HTMLAttributeList & | set (const std::string &name, const std::string &value)
| Add a HTMLAttribute to this list. More...

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

## 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");
cgicc::HTMLAttributeList
An expandable list of HTMLAttribute objects.
Definition: HTMLAttributeList.h:70
cgicc::HTMLAttributeList::set
HTMLAttributeList & set(const std::string &name)
Add an atomic HTMLAttribute to this list.
cgicc::set
HTMLAttributeList set(const std::string &name)
Create a new HTMLAttributeList, and set an HTMLAttribute.
Definition: HTMLAttributeList.h:189

generates an HTMLAttributeList with two elements.

See also
  HTMLAttribute
  HTMLElement

Definition at line 69 of file HTMLAttributeList.h.

## Constructor & Destructor Documentation

## ◆ HTMLAttributeList() [1/3]

cgicc::HTMLAttributeList::HTMLAttributeList | ( |  | ) |

Create an empty HTMLAttributeList.

HTMLAttributeLists are most often created with the set functions

## ◆ HTMLAttributeList() [2/3]

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

## ◆ HTMLAttributeList() [3/3]

cgicc::HTMLAttributeList::HTMLAttributeList | ( | const HTMLAttributeList & | list | ) |

Copy constructor.

Sets the elements in this list to those in `list`

Parameters

  list | The HTMLAttributeList to copy.

## ◆ ~HTMLAttributeList()

cgicc::HTMLAttributeList::~HTMLAttributeList | ( |  | ) |

Destructor.

Delete this HTMLAttributeList object

## Member Function Documentation

## ◆ operator=()

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

## ◆ render()

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

## ◆ set() [1/2]

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`

## ◆ set() [2/2]

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`

The documentation for this class was generated from the following file:

- HTMLAttributeList.h