|
gloox
0.9.9.12
|
#include <dataform.h>


Public Types | |
| enum | DataFormType { FormTypeForm, FormTypeSubmit, FormTypeCancel, FormTypeResult, FormTypeInvalid } |
Public Types inherited from DataFormBase | |
| typedef std::list < DataFormField * > | FieldList |
Public Member Functions | |
| DataForm (DataFormType type, const StringList &instructions, const std::string &title="") | |
| DataForm (DataFormType type, const std::string &title="") | |
| DataForm (Tag *tag) | |
| DataForm () | |
| virtual | ~DataForm () |
| Tag * | tag () const |
| const std::string & | title () const |
| void | setTitle (const std::string &title) |
| const StringList & | instructions () const |
| void | setInstructions (const StringList &instructions) |
| DataForm::DataFormType | type () const |
| bool | parse (Tag *tag) |
Public Member Functions inherited from DataFormBase | |
| DataFormBase () | |
| virtual | ~DataFormBase () |
| bool | hasField (const std::string &field) |
| DataFormField * | field (const std::string &field) |
| FieldList & | fields () |
| virtual void | setFields (FieldList &fields) |
| virtual void | addField (DataFormField *field) |
| DataFormField * | addField (DataFormField::DataFormFieldType type, const std::string &name, const std::string &value="", const std::string &label="") |
| enum DataFormType |
Describes the possible Form Types.
| FormTypeForm |
The forms-processing entity is asking the forms-submitting entity to complete a form. |
| FormTypeSubmit |
The forms-submitting entity is submitting data to the forms-processing entity. |
| FormTypeCancel |
The forms-submitting entity has cancelled submission of data to the forms-processing entity. |
| FormTypeResult |
The forms-processing entity is returning data (e.g., search results) to the forms-submitting entity, or the data is a generic data set. |
| FormTypeInvalid |
The form is invalid. Only possible if the form was created from an Tag which doesn't correctly describe a Data Form. |
Definition at line 41 of file dataform.h.
| DataForm | ( | DataFormType | type, |
| const StringList & | instructions, | ||
| const std::string & | title = "" |
||
| ) |
Constructs a new, empty form.
| type | The form type. |
| instructions | Natural-language instructions for filling out the form. Should not contain newlines (\n, \r). |
| title | The natural-language title of the form. Should not contain newlines (\n, \r). |
Definition at line 23 of file dataform.cpp.
| DataForm | ( | DataFormType | type, |
| const std::string & | title = "" |
||
| ) |
Constructs a new, empty form without any instructions or title set. Probably best suited for result forms.
| type | The form type. |
| title | The natural-language title of the form. Should not contain newlines (\n, \r). |
Definition at line 28 of file dataform.cpp.
Constructs a new DataForm from an existing Tag/XML representation.
| tag | The existing form to parse. |
Definition at line 33 of file dataform.cpp.
| DataForm | ( | ) |
Constructs an empty DataForm. Its type is FormTypeInvalid.
Definition at line 39 of file dataform.cpp.
|
virtual |
Virtual destructor.
Definition at line 44 of file dataform.cpp.
|
inline |
Retrieves the natural-language instructions for the form.
Definition at line 114 of file dataform.h.
| bool parse | ( | Tag * | tag | ) |
Parses the given Tag and creates an appropriate DataForm representation.
| tag | The Tag to parse. |
Definition at line 48 of file dataform.cpp.
|
inline |
Use this function to set natural-language instructions for the form.
| instructions | The instructions for the form. |
Definition at line 123 of file dataform.h.
|
inline |
Use this function to set the title of the form.
| title | The new title of the form. |
Definition at line 108 of file dataform.h.
| Tag * tag | ( | ) | const |
Use this function to create a Tag representation of the form.
Definition at line 92 of file dataform.cpp.
|
inline |
Use this function to retrieve the title of the form.
Definition at line 101 of file dataform.h.
|
inline |
Returns the form's type.
Definition at line 130 of file dataform.h.
1.8.1.2