#include <cgicc/HTMLAttribute.h>
Inheritance diagram for cgicc::HTMLAttribute::
Public Methods | |
virtual void | render (std::ostream &out) const |
Render this attribute to an ostream. More... | |
Constructors and Destructor | |
HTMLAttribute () | |
Create an empty HTMLAttribute. More... | |
HTMLAttribute (const std::string &name) | |
Create an HTMLAttribute with the given name. More... | |
HTMLAttribute (const std::string &name, const std::string &value) | |
Create an HTMLAttribute with the given name and value. More... | |
HTMLAttribute (const HTMLAttribute &attribute) | |
Copy constructor. More... | |
virtual | ~HTMLAttribute () |
Destructor. More... | |
Overloaded Operators | |
bool | operator== (const HTMLAttribute &att) const |
Compare two HTMLAttributes for equality. More... | |
bool | operator!= (const HTMLAttribute &att) const |
Compare two HTMLAttributes for inequality. More... | |
HTMLAttribute & | operator= (const HTMLAttribute &att) |
Assign one HTMLAttribute to another. More... | |
Accessor Methods | |
Information on the attribute | |
std::string | getName () const |
Get the name of this HTMLAttribute. More... | |
std::string | getValue () const |
Get the value of this HTMLAttribute. More... | |
Mutator Methods | |
Set properties of the attribute | |
void | setName (const std::string &name) |
Set the name of this HTMLAttribute. More... | |
void | setValue (const std::string &value) |
Set the value of this HTMLAttribute. More... |
An HTMLAttribute represents a single name/value pair inside an HTMLElement. For example, in the HTML code:
<a href="mailto:sbooth@gnu.org">Send mail</a>
(href, mailto:sbooth@gnu.org)
is an HTMLAttribute. HTMLAttribute objects are usually not created directly, but using the set() methods. To generate the HTML above using cgicc, write cout << cgicc::a("Send Mail").set("href", "mailto:sbooth@gnu.org");
Definition at line 69 of file HTMLAttribute.h.
|
Create an empty HTMLAttribute.
The name and value are set to an empty string. |
|
Create an HTMLAttribute with the given name.
This will simply set the name and value to the same value.
|
|
Create an HTMLAttribute with the given name and value.
Most attributes are of this form
|
|
Copy constructor.
Sets the name of value of this attribute to those of
|
|
Destructor.
Delete this HTMLAttribute object |
|
Get the name of this HTMLAttribute.
For example,
Definition at line 177 of file HTMLAttribute.h. |
|
Get the value of this HTMLAttribute.
For example,
Definition at line 187 of file HTMLAttribute.h. |
|
Compare two HTMLAttributes for inequality.
HTMLAttributes are equal if they have the same name and value.
Definition at line 142 of file HTMLAttribute.h. |
|
Assign one HTMLAttribute to another.
Sets the name of value of this attribute to those of
|
|
Compare two HTMLAttributes for equality.
HTMLAttributes are equal if they have the same name and value.
|
|
Render this attribute to an ostream.
This is used for output purposes
Reimplemented from cgicc::MStreamable. |
|
Set the name of this HTMLAttribute.
Use this method if the name wasn't specified in the constructor
Definition at line 205 of file HTMLAttribute.h. |
|
Set the value of this HTMLAttribute.
Use this method if the value wasn't specified in the constructor
Definition at line 215 of file HTMLAttribute.h. |