24 #ifndef _HTMLCLASSES_H_ 25 #define _HTMLCLASSES_H_ 1 48 #define TAG(name, tag) \ 50 { public: inline static const char* getName() { return tag; } } 60 #define ATOMIC_ELEMENT(name, tag) \ 61 TAG(name, tag); typedef HTMLAtomicElement<name##Tag> name 72 #define BOOLEAN_ELEMENT(name, tag) \ 73 TAG(name, tag); typedef HTMLBooleanElement<name##Tag> name 87 {
public:
inline static const char* getName() {
return 0; } };
94 virtual void render(std::ostream& out)
const 98 out << (
getState() ?
"<!-- " :
" -->");
101 out <<
"<!-- " <<
getData() <<
" -->";
virtual bool getState() const
Get the state of this boolean element.
#define ATOMIC_ELEMENT(name, tag)
Create an atomic HTML element.
#define BOOLEAN_ELEMENT(name, tag)
An HTML element maintaining an internal on/off state.
Platform and operating system specific macro definitions.
std::string getData() const
Get the data contained in this element, if any.
Class which specifies the DTD of the HTML 4 document.
Template for concrete boolean HTMLElement subclasses.
virtual void swapState() const
Swap the state of this boolean element.
Template class for concrete atomic HTMLElement subclasses.
Template class for concrete boolean HTMLElement subclasses.
The namespace containing the cgicc library.
bool dataSpecified() const
For subclasses only.