ulxr::HtmlFormData Class Reference
[HTTP and HTML handling]

Helper class to deal with form data. More...

#include <ulxr_htmlform_handler.h>

List of all members.

Public Types

typedef std::map< CppString,
std::vector< CppString > > 
Elements

Public Member Functions

void addElement (const CppString &name, const CppString &value)
 Adds another name/value pair from a form.
std::vector< CppStringgetElement (const CppString &name) const
 Gets all the values for a form element.
std::vector< CppStringgetElement (const CppString &name, unsigned index) const
 Gets all the values for a form element.
bool hasElement (const CppString &name) const
 Determines if an element is available in the form.
bool hasElement (const CppString &name, unsigned index) const
 Determines if an element is available in the form.
unsigned size () const
 Gets the number of available elements.

Private Attributes

Elements elements


Detailed Description

Helper class to deal with form data.

Definition at line 46 of file ulxr_htmlform_handler.h.


Member Typedef Documentation

typedef std::map<CppString, std::vector<CppString> > ulxr::HtmlFormData::Elements

Definition at line 49 of file ulxr_htmlform_handler.h.


Member Function Documentation

void ulxr::HtmlFormData::addElement ( const CppString name,
const CppString value 
)

Adds another name/value pair from a form.

Parameters:
name the name of the form element
value the form elements value

Definition at line 609 of file ulxr_htmlform_handler.cpp.

Referenced by ulxr::HtmlFormHandler::extractFormElements().

std::vector< CppString > ulxr::HtmlFormData::getElement ( const CppString name  )  const

Gets all the values for a form element.

Parameters:
name the name of the form element
Returns:
the form elements values (one or more)

Definition at line 615 of file ulxr_htmlform_handler.cpp.

References ulxr::ApplicationError, ulxr_i18n, and ULXR_PCHAR.

std::vector< CppString > ulxr::HtmlFormData::getElement ( const CppString name,
unsigned  index 
) const

Gets all the values for a form element.

Intended for numbered elements with the pattern "name" "_" [number] as created by HtmlFormHandler::makeIdent()

Parameters:
name the name of the form element
index the elements index
Returns:
the form elements values (one or more)

Definition at line 625 of file ulxr_htmlform_handler.cpp.

References ulxr::HtmlFormHandler::makeNumber().

bool ulxr::HtmlFormData::hasElement ( const CppString name  )  const

Determines if an element is available in the form.

Parameters:
name the name of the form element
Returns:
true: at least on values is available

Definition at line 631 of file ulxr_htmlform_handler.cpp.

bool ulxr::HtmlFormData::hasElement ( const CppString name,
unsigned  index 
) const

Determines if an element is available in the form.

Intended for numbered elements with the pattern "name" "_" [number] as created by HtmlFormHandler::makeIdent()

Parameters:
name the name of the form element
index the elements index
Returns:
true: at least on values is available

Definition at line 637 of file ulxr_htmlform_handler.cpp.

References ulxr::HtmlFormHandler::makeNumber().

unsigned ulxr::HtmlFormData::size (  )  const

Gets the number of available elements.

Returns:
number of form elements

Definition at line 603 of file ulxr_htmlform_handler.cpp.


Member Data Documentation

Elements ulxr::HtmlFormData::elements [private]

Definition at line 94 of file ulxr_htmlform_handler.h.


The documentation for this class was generated from the following files:
Generated on Sun Aug 19 20:09:04 2007 for ulxmlrpcpp by  doxygen 1.5.1