Google
Web alhem.net

Cgi::Select::Value Class Reference

Inheritance diagram for Cgi::Select::Value:

Inheritance graph
Collaboration diagram for Cgi::Select::Value:

Collaboration graph
List of all members.

Public Member Functions

 Value (Select &sel, const std::string &text)
virtual ~Value ()
virtual void Print ()
virtual bool Selected ()

Public Attributes

Selectm_sel
std::string m_text

Detailed Description

Definition at line 35 of file Select.h.


Constructor & Destructor Documentation

Cgi::Select::Value::Value ( Select sel,
const std::string &  text 
) [inline]

Definition at line 37 of file Select.h.

00037 : m_sel(sel), m_text(text) {}

virtual Cgi::Select::Value::~Value (  )  [inline, virtual]

Definition at line 38 of file Select.h.

00038 {}


Member Function Documentation

virtual void Cgi::Select::Value::Print (  )  [inline, virtual]

Reimplemented in Cgi::Select::Multi.

Definition at line 39 of file Select.h.

References m_text, and Selected().

00039                                      {
00040                         printf("<option%s>%s", Selected() ? " selected" : "", m_text.c_str());
00041                 }

virtual bool Cgi::Select::Value::Selected (  )  [inline, virtual]

Reimplemented in Cgi::Select::Multi.

Definition at line 42 of file Select.h.

References m_sel, Cgi::Select::m_selected_str, and m_text.

Referenced by Print().

00042                                         {
00043                         if (!strcmp(m_text.c_str(), m_sel.m_selected_str.c_str()))
00044                                 return true;
00045                         return false;
00046                 }


Member Data Documentation

Select& Cgi::Select::Value::m_sel

Definition at line 47 of file Select.h.

Referenced by Cgi::Select::Multi::Selected(), and Selected().

std::string Cgi::Select::Value::m_text

Definition at line 48 of file Select.h.

Referenced by Cgi::Select::Multi::Print(), Print(), and Selected().


The documentation for this class was generated from the following file:
Generated for cgi++ by doxygen 1.3.7

Page, code, and content Copyright (C) 2004 by Anders Hedström