#include <Select.h>
Inheritance diagram for Cgi::Select:
Public Member Functions | |
Select (const std::string &name) | |
~Select () | |
void | Add (const std::string &value) |
void | Add (long value, const std::string &description) |
void | Selected (const std::string x) |
void | Selected (long x) |
void | Print () |
Private Member Functions | |
Select (const Select &) | |
Select & | operator= (const Select &) |
Private Attributes | |
std::string | m_name |
std::list< Value * > | m_values |
long | m_selected |
std::string | m_selected_str |
Friends | |
class | Value |
Classes | |
class | Multi |
class | Value |
Definition at line 33 of file Select.h.
Cgi::Select::Select | ( | const std::string & | name | ) |
Cgi::Select::~Select | ( | ) |
Cgi::Select::Select | ( | const Select & | ) | [inline, private] |
void Cgi::Select::Add | ( | const std::string & | value | ) |
void Cgi::Select::Add | ( | long | value, | |
const std::string & | description | |||
) |
Definition at line 45 of file Select.cpp.
References m_values.
00046 { 00047 m_values.push_back(new Multi(*this, value, description)); 00048 }
void Cgi::Select::Selected | ( | const std::string | x | ) | [inline] |
void Cgi::Select::Selected | ( | long | x | ) | [inline] |
void Cgi::Select::Print | ( | ) |
Definition at line 51 of file Select.cpp.
References Cgi::Styled::GetStyle(), m_name, and m_values.
00052 { 00053 if (GetStyle().size()) 00054 { 00055 printf("<select style='%s' name='%s'>", GetStyle().c_str(), m_name.c_str()); 00056 } 00057 else 00058 { 00059 printf("<select name='%s'>", m_name.c_str()); 00060 } 00061 for (std::list<Value *>::iterator it = m_values.begin(); it != m_values.end(); it++) 00062 { 00063 Value *p = *it; 00064 p -> Print(); 00065 } 00066 printf("</select>"); 00067 }
std::string Cgi::Select::m_name [private] |
std::list<Value *> Cgi::Select::m_values [private] |
long Cgi::Select::m_selected [private] |
Definition at line 81 of file Select.h.
Referenced by Selected(), and Cgi::Select::Multi::Selected().
std::string Cgi::Select::m_selected_str [private] |
Definition at line 82 of file Select.h.
Referenced by Selected(), and Cgi::Select::Value::Selected().