#include <dataform.h>
Inherits DataFormBase.
Inheritance diagram for DataForm:
Public Types | |
FORM_TYPE_FORM | |
FORM_TYPE_SUBMIT | |
FORM_TYPE_CANCEL | |
FORM_TYPE_RESULT | |
FORM_TYPE_INVALID | |
enum | DataFormType { FORM_TYPE_FORM, FORM_TYPE_SUBMIT, FORM_TYPE_CANCEL, FORM_TYPE_RESULT, FORM_TYPE_INVALID } |
Public Member Functions | |
DataForm (DataFormType type, const StringList &instructions, const std::string &title="") | |
DataForm (Tag *tag) | |
virtual | ~DataForm () |
const Tag * | tag () const |
const std::string & | title () const |
void | setTitle (const std::string &title) |
const StringList & | instructions () const |
void | setInstructions (const StringList &instructions) |
Definition at line 33 of file dataform.h.
enum DataFormType |
Describes the possible Form Types.
FORM_TYPE_FORM | The forms-processing entity is asking the forms-submitting entity to complete a form. |
FORM_TYPE_SUBMIT | The forms-submitting entity is submitting data to the forms-processing entity. |
FORM_TYPE_CANCEL | The forms-submitting entity has cancelled submission of data to the forms-processing entity. |
FORM_TYPE_RESULT | The forms-processing entity is returning data (e.g., search results) to the forms-submitting entity, or the data is a generic data set. |
FORM_TYPE_INVALID | 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 39 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 21 of file dataform.cpp.
Constructs a new DataForm from an existing Tag/XML representation.
tag | The existing form to parse. |
Definition at line 26 of file dataform.cpp.
~DataForm | ( | ) | [virtual] |
Virtual destructor.
Definition at line 59 of file dataform.cpp.
const StringList& instructions | ( | ) | const [inline] |
Retrieves the natural-language instructions for the form.
Definition at line 97 of file dataform.h.
void setInstructions | ( | const StringList & | instructions | ) | [inline] |
Use this function to set natural-language instructions for the form.
instructions | The instructions for the form. |
Definition at line 106 of file dataform.h.
void setTitle | ( | const std::string & | title | ) | [inline] |
Use this function to set the title of the form.
title | The new title of the form. |
Definition at line 91 of file dataform.h.
const Tag * tag | ( | ) | const |
Use this function to create a Tag representation of the form.
Definition at line 63 of file dataform.cpp.
Referenced by Registration::createAccount(), and DataForm::DataForm().
const std::string& title | ( | ) | const [inline] |
Use this function to retrieve the title of the form.
Definition at line 84 of file dataform.h.