Isis 3 Programmer Reference
Isis::BundleSettings::XmlHandler Class Reference

This class is needed to read/write BundleSettings from/to an XML formateed file. More...

Inheritance diagram for Isis::BundleSettings::XmlHandler:
Inheritance graph
Collaboration diagram for Isis::BundleSettings::XmlHandler:
Collaboration graph

Public Member Functions

 XmlHandler (BundleSettings *bundleSettings, Project *project)
 Create an XML Handler (reader) that can populate the BundleSettings class data.
 
 XmlHandler (BundleSettings *bundleSettings)
 
 ~XmlHandler ()
 Destroys BundleSettings::XmlHandler object.
 
virtual bool startElement (const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
 Handle an XML start element.
 
virtual bool characters (const QString &ch)
 Add a character from an XML element to the content handler.
 
virtual bool endElement (const QString &namespaceURI, const QString &localName, const QString &qName)
 Handle end tags for the BundleSettings serialized XML.
 
bool fatalError (const QXmlParseException &exception)
 Format an error message indicating a problem with BundleSettings.
 
virtual void setReader (XmlStackedHandlerReader *)
 
void switchToNewHandler (XmlStackedHandler *nextHandler)
 Switch to a new content handler and continue processing using the new handler.
 

Protected Member Functions

XmlStackedHandlerReaderreader ()
 
const XmlStackedHandlerReaderreader () const
 

Private Member Functions

 Q_DISABLE_COPY (XmlHandler)
 

Private Attributes

BundleSettingsm_xmlHandlerBundleSettings
 
Projectm_xmlHandlerProject
 
QString m_xmlHandlerCharacters
 
QList< BundleObservationSolveSettings * > m_xmlHandlerObservationSettings
 
XmlStackedHandlerReaderm_reader
 
int m_depth
 
QString m_lastStartNamespaceURI
 
QString m_lastStartLocalName
 
QString m_lastStartQName
 
QXmlAttributes m_lastStartAtts
 

Detailed Description

This class is needed to read/write BundleSettings from/to an XML formateed file.

Author
2014-07-21 Ken Edmundson
History
2014-07-21 Ken Edmundson - Original version.

Definition at line 308 of file BundleSettings.h.

Constructor & Destructor Documentation

◆ XmlHandler()

Isis::BundleSettings::XmlHandler::XmlHandler ( BundleSettings * bundleSettings,
Project * project )

Create an XML Handler (reader) that can populate the BundleSettings class data.

See BundleSettings::save() for the expected format. This contructor is called inside the BundleSettings constructor that takes an XmlStackedHandlerReader.

Parameters
bundleSettingsThe BundleSettings we're going to be initializing
projectThe project that contains the settings

Definition at line 1145 of file BundleSettings.cpp.

◆ ~XmlHandler()

Isis::BundleSettings::XmlHandler::~XmlHandler ( )

Destroys BundleSettings::XmlHandler object.

Definition at line 1156 of file BundleSettings.cpp.

Member Function Documentation

◆ characters()

bool Isis::BundleSettings::XmlHandler::characters ( const QString & ch)
virtual

Add a character from an XML element to the content handler.

Parameters
chcharater from XML element
Returns
true

Definition at line 1326 of file BundleSettings.cpp.

◆ endElement()

bool Isis::BundleSettings::XmlHandler::endElement ( const QString & namespaceURI,
const QString & localName,
const QString & qName )
virtual

Handle end tags for the BundleSettings serialized XML.

Parameters
namespaceURIURI of the specified tags namespce
localNameSAX localName
qNameSAX qualified name
Returns
true

Reimplemented from Isis::XmlStackedHandler.

Definition at line 1341 of file BundleSettings.cpp.

References Isis::toBool().

◆ fatalError()

bool Isis::BundleSettings::XmlHandler::fatalError ( const QXmlParseException & exception)

Format an error message indicating a problem with BundleSettings.

Parameters
QXmlParseExceptionExecption thrown by parser.
Returns
false

Definition at line 1367 of file BundleSettings.cpp.

◆ reader() [1/2]

XmlStackedHandlerReader * Isis::XmlStackedHandler::reader ( )
protectedinherited

Definition at line 68 of file XmlStackedHandler.cpp.

◆ reader() [2/2]

const XmlStackedHandlerReader * Isis::XmlStackedHandler::reader ( ) const
protectedinherited

Definition at line 73 of file XmlStackedHandler.cpp.

◆ setReader()

void Isis::XmlStackedHandler::setReader ( XmlStackedHandlerReader * reader)
virtualinherited

Definition at line 28 of file XmlStackedHandler.cpp.

◆ startElement()

bool Isis::BundleSettings::XmlHandler::startElement ( const QString & namespaceURI,
const QString & localName,
const QString & qName,
const QXmlAttributes & attributes )
virtual

Handle an XML start element.

This method is called when the reader finds an open tag. handle the read when the startElement with the name localName has been found.

Parameters
qNameSAX namespace for this tag
localNameSAX local name
qNameSAX qualified name of the tag.
attributesThe list of attributes for the tag.
Returns
bool Indicates whether to continue reading the XML (usually true).
History
2017-05-30 Debbie A. Cook - Added controlPointCoordTypes to the pvl and made global coordinate names generic.

Reimplemented from Isis::XmlStackedHandler.

Definition at line 1175 of file BundleSettings.cpp.

References Isis::Null, Isis::BundleSettings::stringToConvergenceCriteria(), Isis::SurfacePoint::stringToCoordinateType(), Isis::toBool(), Isis::toDouble(), and Isis::toInt().

◆ switchToNewHandler()

void Isis::XmlStackedHandler::switchToNewHandler ( XmlStackedHandler * nextHandler)
inherited

Switch to a new content handler and continue processing using the new handler.

Definition at line 37 of file XmlStackedHandler.cpp.

Member Data Documentation

◆ m_depth

int Isis::XmlStackedHandler::m_depth
privateinherited

Definition at line 141 of file XmlStackedHandler.h.

◆ m_lastStartAtts

QXmlAttributes Isis::XmlStackedHandler::m_lastStartAtts
privateinherited

Definition at line 146 of file XmlStackedHandler.h.

◆ m_lastStartLocalName

QString Isis::XmlStackedHandler::m_lastStartLocalName
privateinherited

Definition at line 144 of file XmlStackedHandler.h.

◆ m_lastStartNamespaceURI

QString Isis::XmlStackedHandler::m_lastStartNamespaceURI
privateinherited

Definition at line 143 of file XmlStackedHandler.h.

◆ m_lastStartQName

QString Isis::XmlStackedHandler::m_lastStartQName
privateinherited

Definition at line 145 of file XmlStackedHandler.h.

◆ m_reader

XmlStackedHandlerReader* Isis::XmlStackedHandler::m_reader
privateinherited

Definition at line 140 of file XmlStackedHandler.h.

◆ m_xmlHandlerBundleSettings

BundleSettings* Isis::BundleSettings::XmlHandler::m_xmlHandlerBundleSettings
private

Definition at line 328 of file BundleSettings.h.

◆ m_xmlHandlerCharacters

QString Isis::BundleSettings::XmlHandler::m_xmlHandlerCharacters
private

Definition at line 330 of file BundleSettings.h.

◆ m_xmlHandlerObservationSettings

QList<BundleObservationSolveSettings *> Isis::BundleSettings::XmlHandler::m_xmlHandlerObservationSettings
private

Definition at line 331 of file BundleSettings.h.

◆ m_xmlHandlerProject

Project* Isis::BundleSettings::XmlHandler::m_xmlHandlerProject
private

Definition at line 329 of file BundleSettings.h.


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