Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

NetworkModelXmlHandler Class Reference

#include <NetworkModelXmlHandler.h>

List of all members.

Public Member Functions

QString getNetworkModelString ()
vector< NeuronGroup * > getNeuronGrpVector ()
bool getParseError ()
QString getParseErrorString ()
 NetworkModelXmlHandler (MonitorArea *)
 ~NetworkModelXmlHandler ()

Protected Member Functions

bool characters (const QString &ch)
bool endElement (const QString &, const QString &, const QString &)
bool error (const QXmlParseException &exception)
QString errorString ()
bool fatalError (const QXmlParseException &exception)
bool startDocument ()
bool startElement (const QString &, const QString &, const QString &, const QXmlAttributes &)
bool warning (const QXmlParseException &exception)

Private Member Functions

 NetworkModelXmlHandler (const NetworkModelXmlHandler &)
NetworkModelXmlHandler operator= (const NetworkModelXmlHandler &)

Private Attributes

QString currentElement
MonitorAreamonitorArea
QString networkModelString
vector< NeuronGroup * > neurGrpVect
NeuronGroupneuronGrp
bool parseError
QString parseErrorString


Detailed Description

Used during SAX2 parsing of XML file representing the model of a neural network. Each neuron group that is read in is used to add a new window to the MonitorArea.

Definition at line 43 of file NetworkModelXmlHandler.h.


Constructor & Destructor Documentation

NetworkModelXmlHandler::NetworkModelXmlHandler MonitorArea monArea  ) 
 

Constructor.

Definition at line 34 of file NetworkModelXmlHandler.cpp.

References monitorArea.

NetworkModelXmlHandler::~NetworkModelXmlHandler  ) 
 

Destructor.

Definition at line 41 of file NetworkModelXmlHandler.cpp.

NetworkModelXmlHandler::NetworkModelXmlHandler const NetworkModelXmlHandler  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

bool NetworkModelXmlHandler::characters const QString &  chars  )  [protected]
 

Called when parser encounters characters.

Definition at line 82 of file NetworkModelXmlHandler.cpp.

References currentElement, NeuronGroup::length, NeuronGroup::name, networkModelString, neuronGrp, NeuronGroup::neuronType, parseError, parseErrorString, NeuronGroup::spacing, NeuronGroup::startNeuronID, NeuronGroup::width, NeuronGroup::xPos, NeuronGroup::yPos, and NeuronGroup::zPos.

bool NetworkModelXmlHandler::endElement const QString &  ,
const QString &  ,
const QString &  qName
[protected]
 

Called when the parser encounters the end of an element.

Definition at line 121 of file NetworkModelXmlHandler.cpp.

References MonitorArea::addMonitorWindow(), monitorArea, networkModelString, neurGrpVect, and neuronGrp.

bool NetworkModelXmlHandler::error const QXmlParseException &  parseEx  )  [protected]
 

Called when the parser generates an error.

Definition at line 146 of file NetworkModelXmlHandler.cpp.

References parseError, and parseErrorString.

QString NetworkModelXmlHandler::errorString  )  [protected]
 

Returns a default error string.

Definition at line 155 of file NetworkModelXmlHandler.cpp.

bool NetworkModelXmlHandler::fatalError const QXmlParseException &  parseEx  )  [protected]
 

Called when the parser generates a fatal error.

Definition at line 162 of file NetworkModelXmlHandler.cpp.

References parseError, and parseErrorString.

QString NetworkModelXmlHandler::getNetworkModelString  ) 
 

Returns a nicely formatted version of the network model XML.

Definition at line 53 of file NetworkModelXmlHandler.cpp.

References networkModelString.

Referenced by ArchiveWidget::loadArchive().

vector< NeuronGroup * > NetworkModelXmlHandler::getNeuronGrpVector  ) 
 

Returns a vector containing details about the neuron groups that have been extracted from the XML.

Definition at line 60 of file NetworkModelXmlHandler.cpp.

References neurGrpVect.

Referenced by ArchiveWidget::loadArchive().

bool NetworkModelXmlHandler::getParseError  ) 
 

Returns true if an error has been encountered during parsing.

Definition at line 66 of file NetworkModelXmlHandler.cpp.

References parseError.

Referenced by ArchiveWidget::loadArchive().

QString NetworkModelXmlHandler::getParseErrorString  ) 
 

Returns a string describing the parsing error.

Definition at line 72 of file NetworkModelXmlHandler.cpp.

References parseErrorString.

Referenced by ArchiveWidget::loadArchive().

NetworkModelXmlHandler NetworkModelXmlHandler::operator= const NetworkModelXmlHandler  )  [private]
 

Declare assignment private so it cannot be used inadvertently.

bool NetworkModelXmlHandler::startDocument  )  [protected]
 

Called when parser reaches the start of the document.

Definition at line 171 of file NetworkModelXmlHandler.cpp.

References parseError, and parseErrorString.

bool NetworkModelXmlHandler::startElement const QString &  ,
const QString &  ,
const QString &  qName,
const QXmlAttributes &  xmlAttributes
[protected]
 

Called when parser reaches the start of an element.

Definition at line 179 of file NetworkModelXmlHandler.cpp.

References currentElement, networkModelString, neuronGrp, NeuronGroup::neuronGrpID, parseError, and parseErrorString.

bool NetworkModelXmlHandler::warning const QXmlParseException &  exception  )  [protected]
 

Called when the parser generates a warning.

Definition at line 227 of file NetworkModelXmlHandler.cpp.


Member Data Documentation

QString NetworkModelXmlHandler::currentElement [private]
 

Stores the current element.

Definition at line 70 of file NetworkModelXmlHandler.h.

Referenced by characters(), and startElement().

MonitorArea* NetworkModelXmlHandler::monitorArea [private]
 

Reference to the monitor area that this class is loading.

Definition at line 73 of file NetworkModelXmlHandler.h.

Referenced by endElement(), and NetworkModelXmlHandler().

QString NetworkModelXmlHandler::networkModelString [private]
 

A nicely formatted version of the network model string that is being parsed. This is useful for setting the paramters for the statistics.

Definition at line 92 of file NetworkModelXmlHandler.h.

Referenced by characters(), endElement(), getNetworkModelString(), and startElement().

vector<NeuronGroup*> NetworkModelXmlHandler::neurGrpVect [private]
 

Store the neuron groups in the network model to enable statistics to be set up.

Definition at line 81 of file NetworkModelXmlHandler.h.

Referenced by endElement(), and getNeuronGrpVector().

NeuronGroup* NetworkModelXmlHandler::neuronGrp [private]
 

NeuronGroup used to hold information about the current neuron group as it is parsed.

Definition at line 77 of file NetworkModelXmlHandler.h.

Referenced by characters(), endElement(), and startElement().

bool NetworkModelXmlHandler::parseError [private]
 

Records whether there has been an error during parsing.

Definition at line 84 of file NetworkModelXmlHandler.h.

Referenced by characters(), error(), fatalError(), getParseError(), startDocument(), and startElement().

QString NetworkModelXmlHandler::parseErrorString [private]
 

Error messages generated during parsing.

Definition at line 87 of file NetworkModelXmlHandler.h.

Referenced by characters(), error(), fatalError(), getParseErrorString(), startDocument(), and startElement().


The documentation for this class was generated from the following files:
Generated on Mon Sep 3 22:29:05 2007 for SpikeStream Application by  doxygen 1.4.4