DataFormBase Class Reference

An abstract base class for a JEP-0004 Data Form. More...

#include <dataformbase.h>

Inherited by DataForm, DataFormItem, and DataFormReported.

Inheritance diagram for DataFormBase:

Inheritance graph
[legend]
List of all members.

Public Types

typedef std::list< DataFormField * > FieldList

Public Member Functions

 DataFormBase ()
virtual ~DataFormBase ()
bool hasField (const std::string &field)
DataFormFieldfield (const std::string &field)
FieldListfields ()
virtual void setFields (FieldList &fields)

Protected Attributes

FieldList m_fields

Detailed Description

An abstract base class for a JEP-0004 Data Form.

You shouldn't need to use this class directly. Use DataForm instead.

Author:
Jakob Schroeter <js@camaya.net>
Since:
0.7

Definition at line 33 of file dataformbase.h.


Member Typedef Documentation

typedef std::list<DataFormField*> FieldList

A list of JEP-0004 Data Form Fields.

Definition at line 49 of file dataformbase.h.


Constructor & Destructor Documentation

DataFormBase (  ) 

Creates a new DataFormBase.

Definition at line 22 of file dataformbase.cpp.

~DataFormBase (  )  [virtual]

Virtual destructor.

Definition at line 26 of file dataformbase.cpp.


Member Function Documentation

bool hasField ( const std::string &  field  ) 

Use this function to check whether this form contains a field with the given name.

Parameters:
field The name of the field (the content of the 'var' attribute).
Returns:
Whether or not the form contains the named field.

Definition at line 49 of file dataformbase.cpp.

DataFormField * field ( const std::string &  field  ) 

Use this function to fetch a copy of a field of the form. If no such field exists, an empty (invalid) field is returned.

Parameters:
field The name of the field (the content of the 'var' attribute).
Returns:
A copy of the field with the given name if it exists, 0 otherwise.

Definition at line 61 of file dataformbase.cpp.

FieldList& fields (  )  [inline]

Use this function to retrieve the list of fields of a form.

Returns:
The list of fields the form contains.

Definition at line 70 of file dataformbase.h.

virtual void setFields ( FieldList fields  )  [inline, virtual]

Use this function to set the fields the form contains.

Parameters:
fields The list of fields.
Note:
Any previously set fields will be deleted. Always set all fields, not a delta.

Definition at line 77 of file dataformbase.h.


The documentation for this class was generated from the following files:
Generated on Tue May 1 14:20:23 2007 for gloox by  doxygen 1.5.1