PHTTPCompositeField Class Reference

#include <httpform.h>

Inheritance diagram for PHTTPCompositeField:

PHTTPField PObject PHTTPFieldArray PHTTPSubForm List of all members.

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.
virtual const PHTTPFieldLocateName (const PString &name) const
 Locate the field naem, recusing down for composite fields.
virtual PHTTPFieldNewField () const
 Create a new field of the same class as the current field.
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.
virtual PString GetHTMLInput (const PString &input) const
 Convert the field input to HTML for inclusion into the HTTP page.
virtual void GetHTMLHeading (PHTML &html) const
 Convert the field to HTML for inclusion into the HTTP page.
virtual PString GetValue (PBoolean dflt=false) const
 Get the string value of the field.
virtual void SetValue (const PString &newValue)
 Set the value of the field.
virtual void LoadFromConfig (PConfig &cfg)
 Get the value of the PConfig to the sub-field.
virtual void SaveToConfig (PConfig &cfg) const
 Set the value of the sub-field into the PConfig.
virtual void GetAllNames (PStringArray &names) const
 Retrieve all the names in the field and subfields.
virtual void SetAllValues (const PStringToString &data)
 Set the value of the field in a list of fields.
virtual PBoolean ValidateAll (const PStringToString &data, PStringStream &msg) const
 Validate the new field value in a list before SetValue() is called.
virtual PINDEX GetSize () const
 Get the number of sub-fields in the composite field.
void Append (PHTTPField *fld)
PHTTPFieldoperator[] (PINDEX idx) const
void RemoveAt (PINDEX idx)
void RemoveAll ()

Protected Attributes

PHTTPFields fields
bool m_includeHeaders

Constructor & Destructor Documentation

PHTTPCompositeField::PHTTPCompositeField ( const char *  name,
const char *  title = NULL,
const char *  help = NULL,
bool  includeHeaders = false 
)


Member Function Documentation

void PHTTPCompositeField::Append ( PHTTPField fld  ) 

virtual void PHTTPCompositeField::ExpandFieldNames ( PString text,
PINDEX  start,
PINDEX &  finish 
) const [virtual]

Reimplemented from PHTTPField.

Reimplemented in PHTTPFieldArray.

virtual void PHTTPCompositeField::GetAllNames ( PStringArray names  )  const [virtual]

Retrieve all the names in the field and subfields.

Returns:
Array of strings for each subfield.

Reimplemented from PHTTPField.

virtual void PHTTPCompositeField::GetHTMLHeading ( PHTML html  )  const [virtual]

Convert the field to HTML for inclusion into the HTTP page.

Reimplemented from PHTTPField.

Reimplemented in PHTTPSubForm.

virtual PString PHTTPCompositeField::GetHTMLInput ( const PString input  )  const [virtual]

Convert the field input to HTML for inclusion into the HTTP page.

Reimplemented from PHTTPField.

virtual void PHTTPCompositeField::GetHTMLTag ( PHTML html  )  const [virtual]

Convert the field to HTML form tag for inclusion into the HTTP page.

Implements PHTTPField.

Reimplemented in PHTTPSubForm, and PHTTPFieldArray.

virtual PINDEX PHTTPCompositeField::GetSize (  )  const [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.

Returns:
Returns field count.

Reimplemented in PHTTPFieldArray.

virtual PString PHTTPCompositeField::GetValue ( PBoolean  dflt = false  )  const [virtual]

Get the string value of the field.

Returns:
String for field value.

Implements PHTTPField.

virtual void PHTTPCompositeField::LoadFromConfig ( PConfig cfg  )  [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 const PHTTPField* PHTTPCompositeField::LocateName ( const PString name  )  const [virtual]

Locate the field naem, recusing down for composite fields.

Returns:
Pointer to located field, or NULL if not found.

Reimplemented from PHTTPField.

virtual PHTTPField* PHTTPCompositeField::NewField (  )  const [virtual]

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

Returns:
New field object instance.

Implements PHTTPField.

Reimplemented in PHTTPSubForm, and PHTTPFieldArray.

PHTTPField& PHTTPCompositeField::operator[] ( PINDEX  idx  )  const [inline]

void PHTTPCompositeField::RemoveAll (  )  [inline]

void PHTTPCompositeField::RemoveAt ( PINDEX  idx  )  [inline]

virtual void PHTTPCompositeField::SaveToConfig ( PConfig cfg  )  const [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 void PHTTPCompositeField::SetAllValues ( const PStringToString data  )  [virtual]

Set the value of the field in a list of fields.

Reimplemented from PHTTPField.

Reimplemented in PHTTPFieldArray.

virtual void PHTTPCompositeField::SetName ( const PString name  )  [virtual]

Set the name for the field.

Reimplemented from PHTTPField.

virtual void PHTTPCompositeField::SetValue ( const PString newValue  )  [virtual]

Set the value of the field.

Implements PHTTPField.

virtual PBoolean PHTTPCompositeField::ValidateAll ( const PStringToString data,
PStringStream msg 
) const [virtual]

Validate the new field value in a list before SetValue() is called.

Returns:
PBoolean if the all the new field values are OK.

Reimplemented from PHTTPField.


Member Data Documentation

PHTTPFields PHTTPCompositeField::fields [protected]

bool PHTTPCompositeField::m_includeHeaders [protected]


The documentation for this class was generated from the following file:
Generated on Fri Oct 14 01:44:11 2011 for PTLib by  doxygen 1.4.7