Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members  

AbstractDocument Class Reference

#include <AbstractDocument.h>

Inheritance diagram for AbstractDocument:

Document UserProfile List of all members.

Public Methods

 AbstractDocument ()
vector< string > getFieldNames () const
DocumentError getField (string name, string &value) const
DocumentError setField (string name, string value, bool exists=false)
virtual string toXML () const=0
virtual DocumentError fromXML (const string &xml)=0

Protected Methods

void fieldsToXML (XMLWriter &xml, const char *prefix) const
void fieldsFromXML (XMLReader &xml, const char *prefix, const hash_set< string, _hash_string > &ns_set) throw (ParseException)

Detailed Description

XML-based document class.


Constructor & Destructor Documentation

AbstractDocument::AbstractDocument  
 

Constructor.


Member Function Documentation

void AbstractDocument::fieldsFromXML XMLReader   xml,
const char *    prefix,
const hash_set< string, _hash_string > &    ns_set
throw (ParseException) [protected]
 

Reads this document's fields from XML.

void AbstractDocument::fieldsToXML XMLWriter   xml,
const char *    prefix
const [protected]
 

Writes an XML representation of this document's fields.

virtual DocumentError AbstractDocument::fromXML const string &    xml [pure virtual]
 

Read document from XML.

Parameters:
xml  the XML for this document

Implemented in Document, and UserProfile.

DocumentError AbstractDocument::getField string    name,
string &    value
const
 

Get field value.

Parameters:
name  the name of the field
value  the string reference to return value

vector< string > AbstractDocument::getFieldNames  
 

Get the field names.

DocumentError AbstractDocument::setField string    name,
string    value,
bool    exists = false
 

Set field to new value.

Parameters:
name  the name of the field
value  the text value for the field
exists  if true, only set field if it exists

virtual string AbstractDocument::toXML   [pure virtual]
 

Returns an XML representation of the document.

Implemented in Document, and UserProfile.


The documentation for this class was generated from the following files:
Generated on Wed Feb 18 13:45:56 2004 for strongroom by doxygen1.2.18