QObjectReader Class Reference

Parses XML and returns QObject trees. More...

#include <qobjectreader.h>

Collaboration diagram for QObjectReader:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 QObjectReader (AbstractFactory *factory=0)
 parses the file and stores a list of the objects internally, which can be obtained from importInstance()
 QObjectReader (QString filename, AbstractFactory *factory=0)
void parse (QString text)
void parseFile (QString filename)
QObject * getRoot ()
 
Returns:
the root xml object, if there is one.

 ~QObjectReader ()
bool startElement (const QString &namespaceURI, const QString &name, const QString &qualifiedName, const QXmlAttributes &attributes)
bool endElement (const QString &namespaceURI, const QString &localName, const QString &qualifiedName)
bool endDocument ()

Detailed Description

Parses XML and returns QObject trees.

This class permits the importing of data from an XML file, and creates a queue of dynamically allocated QObjects, returning them one at a time through importInstance(). Parent-child relationships are maintained, and the properties are set as according to the input specification.

Author:
Alan Ezust

Definition at line 22 of file qobjectreader.h.


Constructor & Destructor Documentation

QObjectReader::QObjectReader ( AbstractFactory factory = 0  )  [inline]

parses the file and stores a list of the objects internally, which can be obtained from importInstance()

Parameters:
factory the objectfactory you wish to use when an <object> tag is encountered. Defaults to one which only creates PropsMap instances to hold your properties.

Definition at line 33 of file qobjectreader.h.


Member Function Documentation

QObject * QObjectReader::getRoot (  ) 

Returns:
the root xml object, if there is one.

NULL if there is not. If this represents an element with child-elements, the child-elements are returned as its children.

Definition at line 98 of file qobjectreader.cpp.


The documentation for this class was generated from the following files:
Generated on Wed Sep 30 01:15:44 2009 for oopapidocs by  doxygen 1.5.1