PTLib
Version 2.18.8
|
#include <httpform.h>
Public Member Functions | |
PHTTPCompositeField (const char *name, const char *title=NULL, const char *help=NULL, bool includeHeaders=false) | |
virtual void | SetName (const PString &name) |
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... | |
virtual PHTTPField * | NewField () const |
Create a new field of the same class as the current field. More... | |
virtual void | ExpandFieldNames (PString &text, PINDEX start, PINDEX &finish) const |
virtual void | GetHTMLTag (PHTML &html) const |
Convert the field to HTML form tag for inclusion into the HTTP page. More... | |
virtual PString | GetHTMLInput (const PString &input) 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 PString | GetValue (PBoolean dflt=false) const |
Get the string value of the field. More... | |
virtual void | SetValue (const PString &newValue) |
Set the value of the field. 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 void | LoadFromJSON (const PJSON::Base &json) |
Get the value of the JSON to the sub-field. More... | |
virtual void | SaveToJSON (PJSON::Base &json) const |
Set the value of the sub-field into the JSON. 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... | |
virtual PINDEX | GetSize () const |
Get the number of sub-fields in the composite field. More... | |
void | Append (PHTTPField *fld) |
PHTTPField & | operator[] (PINDEX idx) const |
void | RemoveAt (PINDEX idx) |
void | RemoveAll () |
![]() | |
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... | |
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 PString | GetHTMLSelect (const PString &selection) const |
Convert the field input to HTML for inclusion into the HTTP page. More... | |
virtual PBoolean | Validated (const PString &newVal, PStringStream &msg) const |
Validate the new field value before SetValue() is called. More... | |
PBoolean | NotYetInHTML () const |
void | SetInHTML () |
![]() | |
__inline unsigned | GetTraceContextIdentifier () const |
Get PTRACE context identifier. More... | |
__inline void | SetTraceContextIdentifier (unsigned id) |
__inline void | SetTraceContextIdentifier (const PObject &obj) |
__inline void | SetTraceContextIdentifier (const PObject *obj) |
__inline void | CopyTraceContextIdentifier (PObject &obj) const |
__inline void | CopyTraceContextIdentifier (PObject *obj) const |
virtual | ~PObject () |
__inline const char * | GetClass () const |
__inline bool | IsClass (const char *name) const |
__inline const PObject * | PTraceObjectInstance () const |
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 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... | |
Protected Attributes | |
PHTTPFields | m_fields |
bool | m_includeHeaders |
![]() | |
PCaselessString | m_baseName |
PCaselessString | m_fullName |
PString | m_title |
PString | m_help |
bool | m_notInHTML |
![]() | |
unsigned | m_traceContextIdentifier |
Additional Inherited Members | |
![]() | |
enum | Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 } |
Result of the comparison operation performed by the Compare() function. More... | |
![]() | |
static __inline void | CopyTraceContextIdentifier (PObject &to, const PObject &from) |
static __inline void | CopyTraceContextIdentifier (PObject &to, const PObject *from) |
static __inline void | CopyTraceContextIdentifier (PObject *to, const PObject &from) |
static __inline void | CopyTraceContextIdentifier (PObject *to, const PObject *from) |
static __inline const char * | Class () |
static __inline const PObject * | PTraceObjectInstance (const char *) |
static __inline const PObject * | PTraceObjectInstance (const PObject *obj) |
template<typename T > | |
static Comparison | Compare2 (T v1, T v2) |
Compare two types, returning Comparison type. More... | |
static Comparison | InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size) |
Internal function caled from CompareObjectMemoryDirect() More... | |
![]() | |
PObject () | |
Constructor for PObject, made protected so cannot ever create one on its own. More... | |
PHTTPCompositeField::PHTTPCompositeField | ( | const char * | name, |
const char * | title = NULL , |
||
const char * | help = NULL , |
||
bool | includeHeaders = false |
||
) |
void PHTTPCompositeField::Append | ( | PHTTPField * | fld | ) |
|
virtual |
Reimplemented from PHTTPField.
Reimplemented in PHTTPFieldArray.
|
virtual |
Retrieve all the names in the field and subfields.
Reimplemented from PHTTPField.
|
virtual |
Convert the field to HTML for inclusion into the HTTP page.
Reimplemented from PHTTPField.
Reimplemented in PHTTPSubForm.
Convert the field input to HTML for inclusion into the HTTP page.
Reimplemented from PHTTPField.
|
virtual |
Convert the field to HTML form tag for inclusion into the HTTP page.
Implements PHTTPField.
Reimplemented in PHTTPFieldArray, and PHTTPSubForm.
|
virtual |
Get the number of sub-fields in the composite field.
Note that this is the total including any composite sub-fields, ie, it is the size of the whole tree of primitive fields.
Reimplemented in PHTTPFieldArray.
|
virtual |
Get the value of the PConfig to the sub-field.
If the field is not composite then it always sets the value as for the non-indexed version.
Reimplemented from PHTTPField.
Reimplemented in PHTTPFieldArray.
|
virtual |
Get the value of the JSON to the sub-field.
If the field is not composite then it always sets the value as for the non-indexed version.
Reimplemented from PHTTPField.
Reimplemented in PHTTPFieldArray.
|
virtual |
Locate the field naem, recusing down for composite fields.
Reimplemented from PHTTPField.
|
virtual |
Create a new field of the same class as the current field.
Implements PHTTPField.
Reimplemented in PHTTPFieldArray, and PHTTPSubForm.
|
inline |
References m_fields.
|
inline |
References m_fields.
Referenced by PHTTPForm::RemoveAllFields().
|
inline |
References m_fields.
|
virtual |
Set the value of the sub-field into the PConfig.
If the field is not composite then it always sets the value as for the non-indexed version.
Reimplemented from PHTTPField.
Reimplemented in PHTTPFieldArray.
|
virtual |
Set the value of the sub-field into the JSON.
If the field is not composite then it always sets the value as for the non-indexed version.
Reimplemented from PHTTPField.
Reimplemented in PHTTPFieldArray.
|
virtual |
Set the value of the field in a list of fields.
Reimplemented from PHTTPField.
Reimplemented in PHTTPFieldArray.
|
virtual |
Set the name for the field.
Reimplemented from PHTTPField.
|
virtual |
Set the value of the field.
Implements PHTTPField.
|
virtual |
Validate the new field value in a list before SetValue()
is called.
Reimplemented from PHTTPField.
|
protected |
Referenced by operator[](), RemoveAll(), and RemoveAt().
|
protected |