25 #define _FORMENTRY_H_ 1 97 const std::string& value)
98 : fName(name), fValue(value)
109 { operator=(entry); }
146 {
return ! operator==(entry); }
163 operator= (
const FormEntry& entry);
214 {
return makeString(maxChars,
true); }
224 {
return getStrippedValue(INT_MAX); }
237 {
return makeString(maxChars,
false); }
248 getIntegerValue(
long min = LONG_MIN,
249 long max = LONG_MAX)
const;
262 getIntegerValue(
long min,
264 bool& bounded)
const;
275 getDoubleValue(
double min = -DBL_MAX,
276 double max = DBL_MAX)
const;
289 getDoubleValue(
double min,
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;
Class representing a single HTML form entry.
std::string::size_type length() const
Get the number of characters in the value of the form element.
Platform and operating system specific macro definitions.
FormEntry()
Default constructor.
std::string getValue() const
Get the value of the form element as a string.
std::string getStrippedValue() 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 getValue(std::string::size_type maxChars) const
Get the value of the form element as a string.
bool isEmpty() const
Determine if this form element is empty.
A collection of utility functions.
std::string getStrippedValue(std::string::size_type maxChars) const
Get the value of the form element as a string.
FormEntry(const FormEntry &entry)
Copy constructor.
bool stringsAreEqual(const std::string &s1, const std::string &s2)
Compare two strings for equality, ignoring case.
The namespace containing the cgicc library.