Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

PHTTPField Class Reference

#include <httpform.h>

Inheritance diagram for PHTTPField:

PObject PHTTPBooleanField PHTTPCompositeField PHTTPIntegerField PHTTPRadioField PHTTPSelectField PHTTPStringField PHTTPFieldArray PHTTPSubForm PHTTPPasswordField List of all members.

Public Member Functions

 PHTTPField (const char *bname, const char *title, const char *help)
virtual Comparison Compare (const PObject &obj) const
const PCaselessStringGetName () const
const PCaselessStringGetBaseName () const
virtual void SetName (const PString &newName)
virtual const PHTTPFieldLocateName (const PString &name) const
const PStringGetTitle () const
const PStringGetHelp () const
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 PHTTPFieldNewField () const =0
virtual void ExpandFieldNames (PString &text, PINDEX start, PINDEX &finish) const
virtual void GetHTMLTag (PHTML &html) const =0
virtual PString GetHTMLInput (const PString &input) const
virtual PString GetHTMLSelect (const PString &selection) const
virtual void GetHTMLHeading (PHTML &html) const
virtual PString GetValue (BOOL dflt=FALSE) const =0
virtual void SetValue (const PString &newValue)=0
virtual void LoadFromConfig (PConfig &cfg)
virtual void SaveToConfig (PConfig &cfg) const
virtual BOOL Validated (const PString &newVal, PStringStream &msg) const
virtual void GetAllNames (PStringList &list) const
virtual void SetAllValues (const PStringToString &data)
virtual BOOL ValidateAll (const PStringToString &data, PStringStream &msg) const
BOOL NotYetInHTML () const
void SetInHTML ()

Protected Attributes

PCaselessString baseName
PCaselessString fullName
PString title
PString help
BOOL notInHTML

Detailed Description

This class is the abstract base class for fields in a PHTTPForm# resource type.


Constructor & Destructor Documentation

PHTTPField::PHTTPField const char *  bname,
const char *  title,
const char *  help
 


Member Function Documentation

virtual Comparison PHTTPField::Compare const PObject obj  )  const [virtual]
 

Compare the fields using the field names.

Returns:
Comparison of the name fields of the two fields.

Reimplemented from PObject.

virtual void PHTTPField::ExpandFieldNames PString text,
PINDEX  start,
PINDEX &  finish
const [virtual]
 

Reimplemented in PHTTPCompositeField, and PHTTPFieldArray.

virtual void PHTTPField::GetAllNames PStringList list  )  const [virtual]
 

Retrieve all the names in the field and subfields.

Returns:
List of strings for each subfield.

Reimplemented in PHTTPCompositeField.

const PCaselessString& PHTTPField::GetBaseName  )  const [inline]
 

Get the identifier name of the field.

Returns:
String for field name.

const PString& PHTTPField::GetHelp  )  const [inline]
 

Get the title of the field.

Returns:
String for title placed next to the field.

virtual void PHTTPField::GetHTMLHeading PHTML html  )  const [virtual]
 

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

Reimplemented in PHTTPCompositeField, and PHTTPSubForm.

virtual PString PHTTPField::GetHTMLInput const PString input  )  const [virtual]
 

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

Reimplemented in PHTTPCompositeField, PHTTPBooleanField, and PHTTPRadioField.

virtual PString PHTTPField::GetHTMLSelect const PString selection  )  const [virtual]
 

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

virtual void PHTTPField::GetHTMLTag PHTML html  )  const [pure virtual]
 

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

Implemented in PHTTPCompositeField, PHTTPSubForm, PHTTPFieldArray, PHTTPStringField, PHTTPPasswordField, PHTTPIntegerField, PHTTPBooleanField, PHTTPRadioField, and PHTTPSelectField.

const PCaselessString& PHTTPField::GetName  )  const [inline]
 

Get the identifier name of the field.

Returns:
String for field name.

const PString& PHTTPField::GetTitle  )  const [inline]
 

Get the title of the field.

Returns:
String for title placed next to the field.

virtual PString PHTTPField::GetValue BOOL  dflt = FALSE  )  const [pure virtual]
 

Get the string value of the field.

Returns:
String for field value.

Implemented in PHTTPCompositeField, PHTTPStringField, PHTTPPasswordField, PHTTPIntegerField, PHTTPBooleanField, PHTTPRadioField, and PHTTPSelectField.

virtual void PHTTPField::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 in PHTTPCompositeField, PHTTPFieldArray, PHTTPIntegerField, and PHTTPBooleanField.

virtual const PHTTPField* PHTTPField::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 in PHTTPCompositeField.

virtual PHTTPField* PHTTPField::NewField  )  const [pure virtual]
 

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

Returns:
New field object instance.

Implemented in PHTTPCompositeField, PHTTPSubForm, PHTTPFieldArray, PHTTPStringField, PHTTPPasswordField, PHTTPIntegerField, PHTTPBooleanField, PHTTPRadioField, and PHTTPSelectField.

BOOL PHTTPField::NotYetInHTML  )  const [inline]
 

virtual void PHTTPField::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 in PHTTPCompositeField, PHTTPFieldArray, PHTTPIntegerField, and PHTTPBooleanField.

virtual void PHTTPField::SetAllValues const PStringToString data  )  [virtual]
 

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

Reimplemented in PHTTPCompositeField, and PHTTPFieldArray.

void PHTTPField::SetHelp const PString hotLinkURL,
const PString imageURL,
const PString imageText
 

void PHTTPField::SetHelp const PString hotLinkURL,
const PString linkText
 

void PHTTPField::SetHelp const PString text  )  [inline]
 

void PHTTPField::SetInHTML  )  [inline]
 

virtual void PHTTPField::SetName const PString newName  )  [virtual]
 

Set the name for the field.

Reimplemented in PHTTPCompositeField.

virtual void PHTTPField::SetValue const PString newValue  )  [pure virtual]
 

Set the value of the field.

Implemented in PHTTPCompositeField, PHTTPStringField, PHTTPPasswordField, PHTTPIntegerField, PHTTPBooleanField, PHTTPRadioField, and PHTTPSelectField.

virtual BOOL PHTTPField::ValidateAll const PStringToString data,
PStringStream msg
const [virtual]
 

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

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

Reimplemented in PHTTPCompositeField.

virtual BOOL PHTTPField::Validated const PString newVal,
PStringStream msg
const [virtual]
 

Validate the new field value before SetValue()# is called.

Returns:
BOOL if the new field value is OK.

Reimplemented in PHTTPIntegerField.


Member Data Documentation

PCaselessString PHTTPField::baseName [protected]
 

PCaselessString PHTTPField::fullName [protected]
 

PString PHTTPField::help [protected]
 

BOOL PHTTPField::notInHTML [protected]
 

PString PHTTPField::title [protected]
 


The documentation for this class was generated from the following file:
Generated on Mon Feb 21 20:43:13 2005 for PWLib by  doxygen 1.4.1