NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Member Functions | List of all members
niftk::LookupTableSaxHandler Class Reference

SAX handler to load lookup tables into LookupTableContainer objects. More...

Inheritance diagram for niftk::LookupTableSaxHandler:
Inheritance graph
[legend]
Collaboration diagram for niftk::LookupTableSaxHandler:
Collaboration graph
[legend]

Public Member Functions

 LookupTableSaxHandler ()
 
LookupTableContainerGetLookupTableContainer ()
 
bool startElement (const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &attributes) override
 
bool endElement (const QString &namespaceURI, const QString &localName, const QString &qName) override
 
bool characters (const QString &str) override
 
bool fatalError (const QXmlParseException &exception) override
 

Detailed Description

SAX handler to load lookup tables into LookupTableContainer objects.

This class is not designed to be re-used. For each lookup table, you create a new LookupTableSaxHander, parse the XML file, then call GetLookupTable() to get the pointer to the created lookup table. The client then must store and keep track of that pointer. This class must then be thrown away.

This class is not thread safe, so you should load lookup tables one at a time, in a single thread.

Constructor & Destructor Documentation

niftk::LookupTableSaxHandler::LookupTableSaxHandler ( )

No-arg constructor.

Member Function Documentation

bool niftk::LookupTableSaxHandler::characters ( const QString &  str)
override

Methods that we must implement for the handler.

bool niftk::LookupTableSaxHandler::endElement ( const QString &  namespaceURI,
const QString &  localName,
const QString &  qName 
)
override

Methods that we must implement for the handler.

bool niftk::LookupTableSaxHandler::fatalError ( const QXmlParseException &  exception)
override

Methods that we must implement for the handler.

LookupTableContainer * niftk::LookupTableSaxHandler::GetLookupTableContainer ( )

Returns the internal lookup table, you should not call this until the parsing has finished sucessfully.

bool niftk::LookupTableSaxHandler::startElement ( const QString &  namespaceURI,
const QString &  localName,
const QString &  qName,
const QXmlAttributes &  attributes 
)
override

Methods that we must implement for the handler.


The documentation for this class was generated from the following files: