#include <cgicc/FormEntry.h>
Public Methods | |
Constructors and Destructor | |
FormEntry () | |
Default constructor. More... | |
FormEntry (const std::string &name, const std::string &value) | |
Create a new FormEntry. More... | |
FormEntry (const FormEntry &entry) | |
Copy constructor. More... | |
~FormEntry () | |
Destructor. More... | |
Overloaded Operators | |
bool | operator== (const FormEntry &entry) const |
Compare two FormEntrys for equality. More... | |
bool | operator!= (const FormEntry &entry) const |
Compare two FormEntrys for inequality. More... | |
FormEntry & | operator= (const FormEntry &entry) |
Assign one FormEntry to another. More... | |
Accessor Methods | |
Information on the form element | |
std::string | getName () const |
Get the name of the form element. More... | |
std::string | getValue () const |
Get the value of the form element as a string. More... | |
std::string | operator * () const |
Get the value of the form element as a string. More... | |
std::string | getValue (std::string::size_type maxChars) const |
Get the value of the form element as a string. More... | |
std::string | getStrippedValue () const |
Get the value of the form element as a string. More... | |
std::string | getStrippedValue (std::string::size_type maxChars) const |
Get the value of the form element as a string. More... | |
long | getIntegerValue (long min=LONG_MIN, long max=LONG_MAX) const |
Get the value of the form element as an integer. More... | |
double | getDoubleValue (double min=DBL_MIN, double max=DBL_MAX) const |
Get the value of the form element as a double. More... | |
std::string::size_type | length () const |
Get the number of characters in the value of the form element. More... | |
bool | isEmpty () const |
Determine if this form element is empty. More... |
FormEntry is an immutable class representing a single user entry in an HTML form element such as a text field, radio button, or a checkbox. A FormEntry is essentially a name/value pair, where the name is the name of the form element as specified in the HTML form itself, and the value is the user-entered or user-selected value.
If a QUERY_STRING
contained the fragment cgicc=yes
the corresponding FormEntry would have a name of cgicc
and a value of yes
Definition at line 68 of file FormEntry.h.
|
Default constructor.
Shouldn't be used. Definition at line 83 of file FormEntry.h. |
|
Create a new FormEntry.
This is usually not called directly, but by Cgicc.
Definition at line 94 of file FormEntry.h. |
|
Copy constructor.
Sets the name and value of this FormEntry to those of
Definition at line 106 of file FormEntry.h. |
|
Destructor.
Delete this FormEntry object Definition at line 115 of file FormEntry.h. |
|
Get the value of the form element as a double.
No syntax checking is performed on the string value.
|
|
Get the value of the form element as an integer.
No syntax checking is performed on the string value.
|
|
Get the name of the form element.
The name of the form element is specified in the HTML form that called the CGI application.
Definition at line 179 of file FormEntry.h. |
|
Get the value of the form element as a string.
The value returned will be stripped of all line breaks and truncated to a specific length.
Definition at line 234 of file FormEntry.h. |
|
Get the value of the form element as a string.
The value returned will be stripped of all line breaks.
Definition at line 221 of file FormEntry.h. |
|
Get the value of the form element as a string.
The value returned will be truncated to a specific length. The value may contain line breaks.
Definition at line 211 of file FormEntry.h. |
|
Get the value of the form element as a string.
The value returned may contain line breaks.
Definition at line 189 of file FormEntry.h. |
|
Determine if this form element is empty.
In an empty form element, length() == 0.
Definition at line 278 of file FormEntry.h. |
|
Get the number of characters in the value of the form element.
Note that a character may or may not equal one byte.
Definition at line 268 of file FormEntry.h. |
|
Get the value of the form element as a string.
The value returned may contain line breaks.
Definition at line 199 of file FormEntry.h. |
|
Compare two FormEntrys for inequality.
FormEntrys are equal if they have the same name and value.
Definition at line 143 of file FormEntry.h. |
|
Assign one FormEntry to another.
Sets the name and value of this FormEntry to those of
|
|
Compare two FormEntrys for equality.
FormEntrys are equal if they have the same name and value.
Definition at line 132 of file FormEntry.h. |