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

NetworkDataXmlHandler Class Reference

#include <NetworkDataXmlHandler.h>

List of all members.

Signals

void spikeCountChanged (unsigned int neurSpikeCount)
void spikeTotalChanged (unsigned int neurSpikeTotal)
void statisticsChanged ()

Public Member Functions

void addArchiveStatistics (ArchiveStatisticsHolder *archStatHold)
void deleteArchiveStatistics (unsigned int statID)
bool getParseError ()
QString getParseErrorString ()
 NetworkDataXmlHandler ()
void resetStatistics ()
void setNetworkMonitors (map< unsigned int, NetworkMonitor * >)
 ~NetworkDataXmlHandler ()

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

 NetworkDataXmlHandler (const NetworkDataXmlHandler &)
NetworkDataXmlHandler operator= (const NetworkDataXmlHandler &)
void processStatistics ()

Private Attributes

QString currentElement
map< unsigned int, NetworkMonitor * > networkMonitorMap
unsigned int neuronGrpID
map< unsigned int, vector<
ArchiveStatistic * > > 
neuronGrpStatsMap
dense_hash_map< unsigned int,
bool, hash< unsigned int > > 
neuronIDHashMap
unsigned int neurSpikeCount
unsigned int neurSpikeTotal
vector< ArchiveStatistic * > otherArchStatsVector
bool parseError
QString parseErrorString


Detailed Description

Called during SAX2 parsing to play back an archive. Parses the XML file and updates the network monitors.

Definition at line 40 of file NetworkDataXmlHandler.h.


Constructor & Destructor Documentation

NetworkDataXmlHandler::NetworkDataXmlHandler  ) 
 

Constructor.

Definition at line 35 of file NetworkDataXmlHandler.cpp.

References ArchiveStatistic::neuronIDHashMap, neuronIDHashMap, neurSpikeCount, and neurSpikeTotal.

NetworkDataXmlHandler::~NetworkDataXmlHandler  ) 
 

Destructor.

Definition at line 47 of file NetworkDataXmlHandler.cpp.

NetworkDataXmlHandler::NetworkDataXmlHandler const NetworkDataXmlHandler  )  [private]
 

Declare copy constructor private so it cannot be used inadvertently.


Member Function Documentation

void NetworkDataXmlHandler::addArchiveStatistics ArchiveStatisticsHolder archStatHold  ) 
 

Adds a new archive statistic holder. Depending on the type this is added to the.

Definition at line 61 of file NetworkDataXmlHandler.cpp.

References ArchiveStatisticsHolder::archStatVector, ArchiveStatistic::NEURON_GROUP, neuronGrpStatsMap, and otherArchStatsVector.

Referenced by ArchiveManager::addArchiveStatistics().

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

Called when the parser encounters characters.

Definition at line 149 of file NetworkDataXmlHandler.cpp.

References currentElement, networkMonitorMap, neuronGrpID, neuronGrpStatsMap, neuronIDHashMap, parseError, and parseErrorString.

void NetworkDataXmlHandler::deleteArchiveStatistics unsigned int  statID  ) 
 

Deletes an archive statistic holder using the statistics id to find it.

Definition at line 77 of file NetworkDataXmlHandler.cpp.

References neuronGrpStatsMap, and otherArchStatsVector.

Referenced by ArchiveManager::deleteArchiveStatistics().

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

Called when the parser is at the end of an element.

Definition at line 187 of file NetworkDataXmlHandler.cpp.

References networkMonitorMap, neuronGrpID, neuronIDHashMap, neurSpikeCount, neurSpikeTotal, processStatistics(), spikeCountChanged(), SpikeStreamMainWindow::spikeStreamApplication, spikeTotalChanged(), and statisticsChanged().

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

Called when the parser has an error.

Definition at line 212 of file NetworkDataXmlHandler.cpp.

References parseError, and parseErrorString.

QString NetworkDataXmlHandler::errorString  )  [protected]
 

Called to get the error string for the error.

Definition at line 221 of file NetworkDataXmlHandler.cpp.

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

Called when the parser has a fatal error.

Definition at line 227 of file NetworkDataXmlHandler.cpp.

References parseError, and parseErrorString.

bool NetworkDataXmlHandler::getParseError  ) 
 

Returns true if an error has been encountered during parsing.

Definition at line 107 of file NetworkDataXmlHandler.cpp.

References parseError.

Referenced by ArchiveManager::run().

QString NetworkDataXmlHandler::getParseErrorString  ) 
 

Returns a string describing the parsing error.

Definition at line 113 of file NetworkDataXmlHandler.cpp.

References parseErrorString.

Referenced by ArchiveManager::run().

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

Declare assignment private so it cannot be used inadvertently.

void NetworkDataXmlHandler::processStatistics  )  [private]
 

Gathers statistical information about the archive. Should be called after each time step.

Definition at line 296 of file NetworkDataXmlHandler.cpp.

References neuronIDHashMap, neurSpikeCount, neurSpikeTotal, and otherArchStatsVector.

Referenced by endElement().

void NetworkDataXmlHandler::resetStatistics  ) 
 

Resets statistics gathered about the archive.

Definition at line 119 of file NetworkDataXmlHandler.cpp.

References neuronGrpStatsMap, neurSpikeCount, neurSpikeTotal, and otherArchStatsVector.

Referenced by ArchiveManager::loadArchive().

void NetworkDataXmlHandler::setNetworkMonitors map< unsigned int, NetworkMonitor * >  nwMonMap  ) 
 

Sets the maps that are updated from the XML file.

Definition at line 139 of file NetworkDataXmlHandler.cpp.

References networkMonitorMap.

Referenced by ArchiveManager::setNetworkMonitors().

void NetworkDataXmlHandler::spikeCountChanged unsigned int  neurSpikeCount  )  [signal]
 

Referenced by endElement().

void NetworkDataXmlHandler::spikeTotalChanged unsigned int  neurSpikeTotal  )  [signal]
 

Referenced by endElement().

bool NetworkDataXmlHandler::startDocument  )  [protected]
 

Called when the parser is at the start of the document.

Definition at line 236 of file NetworkDataXmlHandler.cpp.

References neuronGrpStatsMap, neuronIDHashMap, neurSpikeCount, otherArchStatsVector, parseError, and parseErrorString.

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

Called when the parser encounters the start of an XML element.

Definition at line 257 of file NetworkDataXmlHandler.cpp.

References currentElement, neuronGrpID, parseError, and parseErrorString.

void NetworkDataXmlHandler::statisticsChanged  )  [signal]
 

Referenced by endElement().

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

Called when the parser has a warning.

Definition at line 285 of file NetworkDataXmlHandler.cpp.


Member Data Documentation

QString NetworkDataXmlHandler::currentElement [private]
 

Name of the current element.

Definition at line 83 of file NetworkDataXmlHandler.h.

Referenced by characters(), and startElement().

map<unsigned int, NetworkMonitor*> NetworkDataXmlHandler::networkMonitorMap [private]
 

Map of the network monitors that will display the archived data.

Definition at line 86 of file NetworkDataXmlHandler.h.

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

unsigned int NetworkDataXmlHandler::neuronGrpID [private]
 

Records the current neuron group that is being unpacked.

Definition at line 89 of file NetworkDataXmlHandler.h.

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

map<unsigned int, vector<ArchiveStatistic*> > NetworkDataXmlHandler::neuronGrpStatsMap [private]
 

Holds all of the statistics that are monitoring whole neuron groups. The key is the neuron group id

Definition at line 103 of file NetworkDataXmlHandler.h.

Referenced by addArchiveStatistics(), characters(), deleteArchiveStatistics(), resetStatistics(), and startDocument().

dense_hash_map<unsigned int, bool, hash<unsigned int> > NetworkDataXmlHandler::neuronIDHashMap [private]
 

Holds the neuron ids firing at each time step for the gathering of statistics.

Definition at line 99 of file NetworkDataXmlHandler.h.

Referenced by characters(), endElement(), NetworkDataXmlHandler(), processStatistics(), and startDocument().

unsigned int NetworkDataXmlHandler::neurSpikeCount [private]
 

Holds the number of spikes in the current time step.

Definition at line 77 of file NetworkDataXmlHandler.h.

Referenced by endElement(), NetworkDataXmlHandler(), processStatistics(), resetStatistics(), and startDocument().

unsigned int NetworkDataXmlHandler::neurSpikeTotal [private]
 

Holds the total number of spikes since the start of the archive.

Definition at line 80 of file NetworkDataXmlHandler.h.

Referenced by endElement(), NetworkDataXmlHandler(), processStatistics(), and resetStatistics().

vector<ArchiveStatistic*> NetworkDataXmlHandler::otherArchStatsVector [private]
 

Holds all of the statistics that are monitoring one or a number of neuron ids.

Definition at line 107 of file NetworkDataXmlHandler.h.

Referenced by addArchiveStatistics(), deleteArchiveStatistics(), processStatistics(), resetStatistics(), and startDocument().

bool NetworkDataXmlHandler::parseError [private]
 

Records whether there has been an error during parsing.

Definition at line 92 of file NetworkDataXmlHandler.h.

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

QString NetworkDataXmlHandler::parseErrorString [private]
 

Error messages generated during parsing.

Definition at line 95 of file NetworkDataXmlHandler.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