PTLib  Version 2.14.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PHTTPEnumField< Enumeration, InitVal > Class Template Reference

#include <httpform.h>

Inheritance diagram for PHTTPEnumField< Enumeration, InitVal >:
Collaboration diagram for PHTTPEnumField< Enumeration, InitVal >:

Public Member Functions

 PHTTPEnumField (const char *name, const PStringArray &valueArray, Enumeration initVal=InitVal, const char *help=NULL)
 
 PHTTPEnumField (const char *name, PINDEX count, const char *const *valueStrings, Enumeration initVal=InitVal, const char *help=NULL)
 
 PHTTPEnumField (const char *name, const char *title, const PStringArray &valueArray, Enumeration initVal=InitVal, const char *help=NULL)
 
 PHTTPEnumField (const char *name, const char *title, PINDEX count, const char *const *valueStrings, Enumeration initVal=InitVal, const char *help=NULL)
 
virtual PHTTPField * NewField () const
 Create a new field of the same class as the current field. More...
 
- Public Member Functions inherited from PHTTPSelectField
 PHTTPSelectField (const char *name, const PStringArray &valueArray, PINDEX initVal=0, const char *help=NULL, bool enumeration=false)
 
 PHTTPSelectField (const char *name, PINDEX count, const char *const *valueStrings, PINDEX initVal=0, const char *help=NULL, bool enumeration=false)
 
 PHTTPSelectField (const char *name, const char *title, const PStringArray &valueArray, PINDEX initVal=0, const char *help=NULL, bool enumeration=false)
 
 PHTTPSelectField (const char *name, const char *title, PINDEX count, const char *const *valueStrings, PINDEX initVal=0, const char *help=NULL, bool enumeration=false)
 
virtual void GetHTMLTag (PHTML &html) const
 Convert the field to HTML form tag for inclusion into the HTTP page. More...
 
virtual PString GetValue (PBoolean dflt=false) const
 Get the string value of the field. More...
 
virtual void SetValue (const PString &newVal)
 Set the value of the field. More...
 
- Public Member Functions inherited from PHTTPField
 PHTTPField (const char *bname, const char *title, const char *help)
 
virtual Comparison Compare (const PObject &obj) const
 Compare the fields using the field names. More...
 
const PCaselessString & GetName () const
 Get the identifier name of the field. More...
 
const PCaselessString & GetBaseName () const
 Get the identifier name of the field. More...
 
virtual void SetName (const PString &newName)
 Set the name for the field. More...
 
virtual const PHTTPField * LocateName (const PString &name) const
 Locate the field naem, recusing down for composite fields. More...
 
const PString & GetTitle () const
 Get the title of the field. More...
 
const PString & GetHelp () const
 Get the title of the field. More...
 
void SetHelp (const PString &text)
 
void SetHelp (const PString &hotLinkURL, const PString &linkText)
 
void SetHelp (const PString &hotLinkURL, const PString &imageURL, const PString &imageText)
 
virtual void ExpandFieldNames (PString &text, PINDEX start, PINDEX &finish) const
 
virtual PString GetHTMLInput (const PString &input) const
 Convert the field input to HTML for inclusion into the HTTP page. More...
 
virtual PString GetHTMLSelect (const PString &selection) const
 Convert the field input to HTML for inclusion into the HTTP page. More...
 
virtual void GetHTMLHeading (PHTML &html) const
 Convert the field to HTML for inclusion into the HTTP page. More...
 
virtual bool LoadFromConfig (PConfig &cfg)
 Get the value of the PConfig to the sub-field. More...
 
virtual void SaveToConfig (PConfig &cfg) const
 Set the value of the sub-field into the PConfig. More...
 
virtual PBoolean Validated (const PString &newVal, PStringStream &msg) const
 Validate the new field value before SetValue() is called. More...
 
virtual void GetAllNames (PStringArray &names) const
 Retrieve all the names in the field and subfields. More...
 
virtual void SetAllValues (const PStringToString &data)
 Set the value of the field in a list of fields. More...
 
virtual PBoolean ValidateAll (const PStringToString &data, PStringStream &msg) const
 Validate the new field value in a list before SetValue() is called. More...
 
PBoolean NotYetInHTML () const
 
void SetInHTML ()
 
- Public Member Functions inherited from PObject
unsigned GetTraceContextIdentifier () const
 Get PTRACE context identifier. More...
 
void SetTraceContextIdentifier (unsigned id)
 
void GetTraceContextIdentifier (PObject &obj)
 
void GetTraceContextIdentifier (PObject *obj)
 
void SetTraceContextIdentifier (const PObject &obj)
 
void SetTraceContextIdentifier (const PObject *obj)
 
virtual ~PObject ()
 
virtual PObject * Clone () const
 Create a copy of the class on the heap. More...
 
template<class CLS >
CLS * CloneAs () const
 As for Clone() but converts to specified type. More...
 
virtual PINDEX HashFunction () const
 This function yields a hash value required by the PDictionary class. More...
 
virtual Comparison CompareObjectMemoryDirect (const PObject &obj) const
 Determine the byte wise comparison of two objects. More...
 
bool operator== (const PObject &obj) const
 Compare the two objects. More...
 
bool operator!= (const PObject &obj) const
 Compare the two objects. More...
 
bool operator< (const PObject &obj) const
 Compare the two objects. More...
 
bool operator> (const PObject &obj) const
 Compare the two objects. More...
 
bool operator<= (const PObject &obj) const
 Compare the two objects. More...
 
bool operator>= (const PObject &obj) const
 Compare the two objects. More...
 
virtual const char * GetClass (unsigned ancestor=0) const
 Get the current dynamic type of the object instance. More...
 
PBoolean IsClass (const char *cls) const
 
virtual PBoolean InternalIsDescendant (const char *clsName) const
 Determine if the dynamic type of the current instance is a descendent of the specified class. More...
 
__inline const PObject * PTraceObjectInstance () const
 
virtual void PrintOn (ostream &strm) const
 Output the contents of the object to the stream. More...
 
virtual void ReadFrom (istream &strm)
 Input the contents of the object from the stream. More...
 

Additional Inherited Members

- Public Types inherited from PObject
enum  Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }
 Result of the comparison operation performed by the Compare() function. More...
 
- Static Public Member Functions inherited from PObject
static Comparison InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size)
 Internal function caled from CompareObjectMemoryDirect() More...
 
static const char * Class ()
 Get the name of the class as a C string. More...
 
static __inline const PObject * PTraceObjectInstance (const char *)
 
static __inline const PObject * PTraceObjectInstance (const PObject *obj)
 
- Protected Member Functions inherited from PHTTPSelectField
void Construct (PINDEX initVal, bool enumeration)
 
- Protected Attributes inherited from PHTTPSelectField
PStringArray m_values
 
bool m_enumeration
 
PINDEX m_initialValue
 
PString m_value
 
- Friends inherited from PObject

Constructor & Destructor Documentation

template<typename Enumeration , Enumeration InitVal = (Enumeration)0>
PHTTPEnumField< Enumeration, InitVal >::PHTTPEnumField ( const char *  name,
const PStringArray &  valueArray,
Enumeration  initVal = InitVal,
const char *  help = NULL 
)
inline
template<typename Enumeration , Enumeration InitVal = (Enumeration)0>
PHTTPEnumField< Enumeration, InitVal >::PHTTPEnumField ( const char *  name,
PINDEX  count,
const char *const *  valueStrings,
Enumeration  initVal = InitVal,
const char *  help = NULL 
)
inline
template<typename Enumeration , Enumeration InitVal = (Enumeration)0>
PHTTPEnumField< Enumeration, InitVal >::PHTTPEnumField ( const char *  name,
const char *  title,
const PStringArray &  valueArray,
Enumeration  initVal = InitVal,
const char *  help = NULL 
)
inline
template<typename Enumeration , Enumeration InitVal = (Enumeration)0>
PHTTPEnumField< Enumeration, InitVal >::PHTTPEnumField ( const char *  name,
const char *  title,
PINDEX  count,
const char *const *  valueStrings,
Enumeration  initVal = InitVal,
const char *  help = NULL 
)
inline

Member Function Documentation

template<typename Enumeration , Enumeration InitVal = (Enumeration)0>
virtual PHTTPField* PHTTPEnumField< Enumeration, InitVal >::NewField ( ) const
inlinevirtual

Create a new field of the same class as the current field.

Returns
New field object instance.

Reimplemented from PHTTPSelectField.

References PHTTPField::baseName, PHTTPField::help, PHTTPSelectField::m_initialValue, PHTTPSelectField::m_values, PHTTPEnumField< Enumeration, InitVal >::PHTTPEnumField(), and PHTTPField::title.


The documentation for this class was generated from the following file: