PTLib  Version 2.10.11
PHTTPFieldArray Class Reference

#include <httpform.h>

Inheritance diagram for PHTTPFieldArray:
PHTTPCompositeField PHTTPField PObject

Public Member Functions

 PHTTPFieldArray (PHTTPField *baseField, PBoolean ordered, PINDEX fixedSize=0)
 
 ~PHTTPFieldArray ()
 
virtual PHTTPFieldNewField () 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 void 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 SetAllValues (const PStringToString &data)
 Set the value of the field in a list of fields. More...
 
virtual PINDEX GetSize () const
 Get the number of sub-fields in the composite field. More...
 
void SetSize (PINDEX newSize)
 
PStringArray GetStrings (PConfig &cfg)
 
void SetStrings (PConfig &cfg, const PStringArray &values)
 
- Public Member Functions inherited from PHTTPCompositeField
 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 PHTTPFieldLocateName (const PString &name) const
 Locate the field naem, recusing down for composite fields. 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 void GetAllNames (PStringArray &names) const
 Retrieve all the names in the field and subfields. More...
 
virtual PBoolean ValidateAll (const PStringToString &data, PStringStream &msg) const
 Validate the new field value in a list before SetValue() is called. More...
 
void Append (PHTTPField *fld)
 
PHTTPFieldoperator[] (PINDEX idx) const
 
void RemoveAt (PINDEX idx)
 
void RemoveAll ()
 
- 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 PCaselessStringGetName () const
 Get the identifier name of the field. More...
 
const PCaselessStringGetBaseName () const
 Get the identifier name of the field. More...
 
const PStringGetTitle () const
 Get the title of the field. More...
 
const PStringGetHelp () 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 ()
 
- Public Member Functions inherited from PObject
virtual ~PObject ()
 
virtual PObjectClone () const
 Create a copy of the class on the heap. 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...
 
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 Member Functions

void AddBlankField ()
 
void AddArrayControlBox (PHTML &html, PINDEX fld) const
 
void SetArrayFieldName (PINDEX idx) const
 
- Protected Member Functions inherited from PObject
 PObject ()
 Constructor for PObject, made protected so cannot ever create one on its own. More...
 

Protected Attributes

PHTTPFieldbaseField
 
PBoolean orderedArray
 
PBoolean canAddElements
 
- Protected Attributes inherited from PHTTPCompositeField
PHTTPFields fields
 
bool m_includeHeaders
 
- Protected Attributes inherited from PHTTPField
PCaselessString baseName
 
PCaselessString fullName
 
PString title
 
PString help
 
PBoolean notInHTML
 

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...
 

Constructor & Destructor Documentation

§ PHTTPFieldArray()

PHTTPFieldArray::PHTTPFieldArray ( PHTTPField baseField,
PBoolean  ordered,
PINDEX  fixedSize = 0 
)

§ ~PHTTPFieldArray()

PHTTPFieldArray::~PHTTPFieldArray ( )

Member Function Documentation

§ AddArrayControlBox()

void PHTTPFieldArray::AddArrayControlBox ( PHTML html,
PINDEX  fld 
) const
protected

§ AddBlankField()

void PHTTPFieldArray::AddBlankField ( )
protected

§ ExpandFieldNames()

virtual void PHTTPFieldArray::ExpandFieldNames ( PString text,
PINDEX  start,
PINDEX &  finish 
) const
virtual

Reimplemented from PHTTPCompositeField.

§ GetHTMLTag()

virtual void PHTTPFieldArray::GetHTMLTag ( PHTML html) const
virtual

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

Reimplemented from PHTTPCompositeField.

§ GetSize()

virtual PINDEX PHTTPFieldArray::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 from PHTTPCompositeField.

§ GetStrings()

PStringArray PHTTPFieldArray::GetStrings ( PConfig cfg)
Parameters
cfgConfig file to get strings from

§ LoadFromConfig()

virtual void PHTTPFieldArray::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 PHTTPCompositeField.

§ NewField()

virtual PHTTPField* PHTTPFieldArray::NewField ( ) const
virtual

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

Returns
New field object instance.

Reimplemented from PHTTPCompositeField.

§ SaveToConfig()

virtual void PHTTPFieldArray::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 PHTTPCompositeField.

§ SetAllValues()

virtual void PHTTPFieldArray::SetAllValues ( const PStringToString data)
virtual

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

Reimplemented from PHTTPCompositeField.

§ SetArrayFieldName()

void PHTTPFieldArray::SetArrayFieldName ( PINDEX  idx) const
protected

§ SetSize()

void PHTTPFieldArray::SetSize ( PINDEX  newSize)

§ SetStrings()

void PHTTPFieldArray::SetStrings ( PConfig cfg,
const PStringArray values 
)
Parameters
cfgConfig file to Set strings to
valuesStrings to set

Member Data Documentation

§ baseField

PHTTPField* PHTTPFieldArray::baseField
protected

§ canAddElements

PBoolean PHTTPFieldArray::canAddElements
protected

§ orderedArray

PBoolean PHTTPFieldArray::orderedArray
protected

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