00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _HTMLATTRIBUTELIST_H_
00023 #define _HTMLATTRIBUTELIST_H_ 1
00024
00025 #ifdef __GNUG__
00026 # pragma interface
00027 #endif
00028
00035 #include <string>
00036 #include <iostream>
00037 #include <vector>
00038
00039 #include "cgicc/CgiDefs.h"
00040 #include "cgicc/MStreamable.h"
00041 #include "cgicc/HTMLAttribute.h"
00042
00043 CGICC_BEGIN_NAMESPACE
00044
00045
00046
00047
00048
00049 #ifdef WIN32
00050 template class CGICC_API STDNS vector<HTMLAttribute>;
00051 #endif
00052
00067 class CGICC_API HTMLAttributeList
00068 {
00069 public:
00070
00071
00072
00075
00081 HTMLAttributeList();
00082
00089 HTMLAttributeList(const HTMLAttribute& head);
00090
00097 HTMLAttributeList(const HTMLAttributeList& list);
00098
00104 ~HTMLAttributeList();
00106
00107
00108
00109
00112
00119 HTMLAttributeList&
00120 operator= (const HTMLAttributeList &list);
00122
00123
00124
00125
00130
00138 HTMLAttributeList&
00139 set(const STDNS string& name);
00140
00149 HTMLAttributeList&
00150 set(const STDNS string& name,
00151 const STDNS string& value);
00153
00156
00163 void
00164 render(STDNS ostream& out) const;
00166
00167 private:
00168 STDNS vector<HTMLAttribute> fAttributes;
00169 };
00170
00171
00172
00173
00174
00186 inline HTMLAttributeList
00187 set(const STDNS string& name)
00188 { return HTMLAttributeList(HTMLAttribute(name)); }
00189
00202 inline HTMLAttributeList
00203 set(const STDNS string& name,
00204 const STDNS string& value)
00205 { return HTMLAttributeList(HTMLAttribute(name, value)); }
00206
00207 CGICC_END_NAMESPACE
00208
00209 #endif