ITK  6.0.0
Insight Toolkit
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
itk::XMLReaderBase Class Referenceabstract

#include <itkXMLFile.h>

Detailed Description

XMLReaderBase encapsulates the expat library (Insight/Utilities/expat and defines the methods needed in a derived class to receive the contents of an XML file in a structured manner. It's 'impure virtual' in that some functions that are generic to opening and parsing a file are implemented here.

Definition at line 35 of file itkXMLFile.h.

+ Inheritance diagram for itk::XMLReaderBase:
+ Collaboration diagram for itk::XMLReaderBase:

Public Types

using Self = XMLReaderBase
 
- Public Types inherited from itk::LightProcessObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightProcessObject
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Public Member Functions

virtual int CanReadFile (const char *name)=0
 
virtual void CharacterDataHandler (const char *inData, int inLength)=0
 
virtual void EndElement (const char *name)=0
 
virtual void GenerateOutputInformation ()
 
virtual const char * GetFilename () const
 
virtual void SetFilename (const char *_arg)
 
virtual void StartElement (const char *name, const char **atts)=0
 
- Public Member Functions inherited from itk::LightProcessObject
virtual void AbortGenerateDataOn ()
 
virtual const bool & GetAbortGenerateData () const
 
const char * GetNameOfClass () const override
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void UpdateOutputData ()
 
void UpdateProgress (float amount)
 
virtual void SetProgress (float _arg)
 
virtual const float & GetProgress () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *cmd) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
LightObject::Pointer CreateAnother () const override
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
const char * GetNameOfClass () const override
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag) const
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 

Protected Member Functions

void parse ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 XMLReaderBase ()=default
 
 ~XMLReaderBase () override=default
 
- Protected Member Functions inherited from itk::LightProcessObject
virtual void GenerateData ()
 
 LightProcessObject ()
 
 ~LightProcessObject () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
 ~Object () override
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 

Protected Attributes

std::string m_Filename {}
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount {}
 

Additional Inherited Members

- Static Public Member Functions inherited from itk::LightProcessObject
static Pointer New ()
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 

Member Typedef Documentation

◆ Self

Definition at line 40 of file itkXMLFile.h.

Constructor & Destructor Documentation

◆ XMLReaderBase()

itk::XMLReaderBase::XMLReaderBase ( )
protecteddefault

◆ ~XMLReaderBase()

itk::XMLReaderBase::~XMLReaderBase ( )
overrideprotecteddefault

Member Function Documentation

◆ CanReadFile()

virtual int itk::XMLReaderBase::CanReadFile ( const char *  name)
pure virtual

determine whether a file can be opened and read

Implemented in itk::PolygonGroupSpatialObjectXMLFileReader.

◆ CharacterDataHandler()

virtual void itk::XMLReaderBase::CharacterDataHandler ( const char *  inData,
int  inLength 
)
pure virtual

Callback function – called from XML parser with the character data for an XML element

Implemented in itk::PolygonGroupSpatialObjectXMLFileReader.

◆ EndElement()

virtual void itk::XMLReaderBase::EndElement ( const char *  name)
pure virtual

Callback function – called from XML parser when ending tag encountered

Implemented in itk::PolygonGroupSpatialObjectXMLFileReader.

◆ GenerateOutputInformation()

virtual void itk::XMLReaderBase::GenerateOutputInformation ( )
virtual

do the actual parsing of the input file

◆ GetFilename()

virtual const char* itk::XMLReaderBase::GetFilename ( ) const
virtual

Get the filename to write

◆ parse()

void itk::XMLReaderBase::parse ( )
protected

Instantiates and invokes the XML parser for the file named by m_Filename. The parser will throw an exception in the case of XML syntax errors, missing filenames, unreadable input file, etc.

◆ PrintSelf()

void itk::XMLReaderBase::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::LightProcessObject.

◆ SetFilename()

virtual void itk::XMLReaderBase::SetFilename ( const char *  _arg)
virtual

Set the filename to write

◆ StartElement()

virtual void itk::XMLReaderBase::StartElement ( const char *  name,
const char **  atts 
)
pure virtual

Callback function – called from XML parser with start-of-element information.

Implemented in itk::PolygonGroupSpatialObjectXMLFileReader.

Member Data Documentation

◆ m_Filename

std::string itk::XMLReaderBase::m_Filename {}
protected

Definition at line 87 of file itkXMLFile.h.


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