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. More...
 
 XmlHandler (BundleSettings *bundleSettings)
 
 ~XmlHandler ()
 Destroys BundleSettings::XmlHandler object. More...
 
virtual bool startElement (const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts)
 Handle an XML start element. More...
 
virtual bool characters (const QString &ch)
 Add a character from an XML element to the content handler. More...
 
virtual bool endElement (const QString &namespaceURI, const QString &localName, const QString &qName)
 Handle end tags for the BundleSettings serialized XML. More...
 
bool fatalError (const QXmlParseException &exception)
 Format an error message indicating a problem with BundleSettings. More...
 
virtual void setReader (XmlStackedHandlerReader *)
 
void switchToNewHandler (XmlStackedHandler *nextHandler)
 Switch to a new content handler and continue processing using the new handler. More...
 

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
 

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 321 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 1140 of file BundleSettings.cpp.

◆ ~XmlHandler()

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

Destroys BundleSettings::XmlHandler object.

Definition at line 1151 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 1321 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 1336 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 1362 of file BundleSettings.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 1170 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 32 of file XmlStackedHandler.cpp.

Referenced by Isis::XmlStackedHandlerReader::pushContentHandler().


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