databases::XMLReader::Callback Class Reference

The callback class used by XMLReader::load(). More...

#include <xml.h>

List of all members.

Public Member Functions

virtual ~Callback ()
 Destructor.
virtual bool database (uint16_t version)=0
 Sets the database information.
virtual bool add_field (char const *name, uint16_t type, size_t size, uint16_t attrs, char const *defval)=0
 Adds field information.
virtual bool count (uint32_t count)=0
 Sets the number of records in the database.
virtual bool begin_record ()=0
 Begins a record.
virtual bool add_value (char const *field, char const *value)=0
 Adds a value to the current record.
virtual bool add_ivalue (char const *field, int32_t value)=0
 Same as add_value(), but the value is an integer.
virtual bool add_uivalue (char const *field, uint32_t value)=0
 Same as add_value(), but the value is an unsigned integer.
virtual bool add_utvalue (char const *field, time_t value)=0
 Same as add_value(), but the value is a Unix timestamp.
virtual bool add_rivalue (char const *field, Record::identifier_type value)=0
 Same as add_value(), but the value is a record identifier.
virtual bool end_record ()=0
 Ends a record.


Detailed Description

Create a class derived from this abstract class so that you may process the data as you wish.


Member Function Documentation

virtual bool databases::XMLReader::Callback::add_field char const *  name,
uint16_t  type,
size_t  size,
uint16_t  attrs,
char const *  defval
[pure virtual]
 

Adds field information.

Parameters:
[in] name The field name (same as Field::name()).
[in] type The field type (same as Field::type()).
[in] size The field size (same as Field::size()).
[in] attrs The field attributes (same as Field::attrs()).
[in] defval The field default value (same as Field::default_value()).
Returns:
true if successful, false otherwise.

virtual bool databases::XMLReader::Callback::add_value char const *  field,
char const *  value
[pure virtual]
 

Adds a value to the current record.

Parameters:
[in] field The field name.
[in] value The value.
Returns:
true if successful, false otherwise.

virtual bool databases::XMLReader::Callback::begin_record  )  [pure virtual]
 

Begins a record. All calls to add_value() and other record-related functions until end_record() is called is relative to this record.

Returns:
true if successful, false otherwise.

virtual bool databases::XMLReader::Callback::count uint32_t  count  )  [pure virtual]
 

Sets the number of records in the database.

Parameters:
[in] count The number of records.
Returns:
true if successful, false otherwise.

virtual bool databases::XMLReader::Callback::database uint16_t  version  )  [pure virtual]
 

Sets the database information.

Parameters:
[in] version The database version (same as Database::version(Database::vtExport)).
Returns:
true if successful, false otherwise.

virtual bool databases::XMLReader::Callback::end_record  )  [pure virtual]
 

Ends a record.

Returns:
true if successful, false otherwise.


The documentation for this class was generated from the following file:
Generated on Sun May 20 21:32:20 2007 for Epona API by  doxygen 1.4.6