gloox
1.0.16
|
#include <dataformfieldcontainer.h>
Public Types | |
typedef std::list < DataFormField * > | FieldList |
Public Member Functions | |
DataFormFieldContainer () | |
DataFormFieldContainer (const DataFormFieldContainer &dffc) | |
virtual | ~DataFormFieldContainer () |
bool | hasField (const std::string &field) const |
DataFormField * | field (const std::string &field) const |
FieldList & | fields () |
const FieldList & | fields () const |
virtual void | setFields (FieldList &fields) |
virtual void | addField (DataFormField *field) |
DataFormField * | addField (DataFormField::FieldType type, const std::string &name, const std::string &value=EmptyString, const std::string &label=EmptyString) |
An abstract base class for a XEP-0004 Data Form.
You shouldn't need to use this class directly. Use DataForm instead.
Definition at line 35 of file dataformfieldcontainer.h.
typedef std::list<DataFormField*> FieldList |
A list of XEP-0004 Data Form Fields.
Definition at line 57 of file dataformfieldcontainer.h.
Creates a new FieldContainer.
Definition at line 21 of file dataformfieldcontainer.cpp.
DataFormFieldContainer | ( | const DataFormFieldContainer & | dffc | ) |
Creates a new FieldContainer, copying all fields from the given FieldContainer.
dffc | The FieldContainer to copy. |
Definition at line 25 of file dataformfieldcontainer.cpp.
|
virtual |
Virtual destructor.
Definition at line 34 of file dataformfieldcontainer.cpp.
|
inlinevirtual |
Use this function to add a single field to the list of existing fields.
field | The field to add. |
Definition at line 99 of file dataformfieldcontainer.h.
|
inline |
Adds a single new Field and returns a pointer to that field.
type | The field's type. |
name | The field's name (the value of the 'var' attribute). |
value | The field's value. |
label | The field's label. |
Definition at line 109 of file dataformfieldcontainer.h.
DataFormField * field | ( | const std::string & | field | ) | const |
Use this function to fetch a pointer to a field of the form. If no such field exists, 0 is returned.
field | The name of the field (the content of the 'var' attribute). |
Definition at line 39 of file dataformfieldcontainer.cpp.
|
inline |
Use this function to retrieve the list of fields of a form.
Definition at line 79 of file dataformfieldcontainer.h.
|
inline |
Use this function to retrieve the const list of fields of a form.
Definition at line 85 of file dataformfieldcontainer.h.
|
inline |
Use this function to check whether this form contains a field with the given name.
field | The name of the field (the content of the 'var' attribute). |
Definition at line 64 of file dataformfieldcontainer.h.
|
inlinevirtual |
Use this function to set the fields the form contains.
fields | The list of fields. |
Definition at line 92 of file dataformfieldcontainer.h.