25#define _FORMENTRY_H_ 1
97 const std::string& value)
98 : fName(name), fValue(value)
109 { operator=(entry); }
146 {
return ! operator==(entry); }
202 {
return getValue(); }
214 {
return makeString(maxChars,
true); }
224 {
return getStrippedValue(INT_MAX); }
237 {
return makeString(maxChars,
false); }
249 long max = LONG_MAX)
const;
264 bool& bounded)
const;
276 double max = DBL_MAX)
const;
291 bool& bounded)
const;
300 inline std::string::size_type
302 {
return fValue.length(); }
312 {
return (0 == length()); }
318 makeString(std::string::size_type maxLen,
319 bool allowNewlines)
const;
Platform and operating system specific macro definitions.
A collection of utility functions.
Class representing a single HTML form entry.
long getIntegerValue(long min, long max, bool &bounded) const
Get the value of the form element as an integer.
bool isEmpty() const
Determine if this form element is empty.
double getDoubleValue(double min=-DBL_MAX, double max=DBL_MAX) const
Get the value of the form element as a double.
std::string getValue(std::string::size_type maxChars) const
Get the value of the form element as a string.
FormEntry()
Default constructor.
FormEntry(const FormEntry &entry)
Copy constructor.
double getDoubleValue(double min, double max, bool &bounded) const
Get the value of the form element as a double.
long getIntegerValue(long min=LONG_MIN, long max=LONG_MAX) const
Get the value of the form element as an integer.
std::string getValue() const
Get the value of the form element as a string.
std::string getStrippedValue(std::string::size_type maxChars) const
Get the value of the form element as a string.
FormEntry(const std::string &name, const std::string &value)
Create a new FormEntry.
std::string getName() const
Get the name of the form element.
std::string getStrippedValue() const
Get the value of the form element as a string.
std::string::size_type length() const
Get the number of characters in the value of the form element.
The namespace containing the cgicc library.
bool stringsAreEqual(const std::string &s1, const std::string &s2)
Compare two strings for equality, ignoring case.