ITK  5.4.0
Insight Toolkit
Public Types | Public Member Functions | Protected Attributes | List of all members
itk::XMLWriterBase< T > Class Template Referenceabstract

#include <itkXMLFile.h>

Detailed Description

template<typename T>
class itk::XMLWriterBase< T >

'Impure virtual' base class for XML File writing. Defines the interface for an XML file writer and provides a few utility functions for writing XML files. A derived class needs to implement writing the file completely by implementing WriteFile.

Definition at line 145 of file itkXMLFile.h.

+ Inheritance diagram for itk::XMLWriterBase< T >:
+ Collaboration diagram for itk::XMLWriterBase< T >:

Public Types

using Self = XMLWriterBase
 
- 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 CanWriteFile (const char *name)=0
 
virtual const char * GetFilename () const
 
virtual void SetFilename (const char *_arg)
 
void SetObject (T *toWrite)
 
void WriteCharacterData (const char *const data, std::ofstream &file)
 
void WriteCharacterData (std::string &data, std::ofstream &file)
 
void WriteEndElement (const char *const tag, std::ofstream &file)
 
void WriteEndElement (std::string &tag, std::ofstream &file)
 
virtual int WriteFile ()=0
 
void WriteStartElement (const char *const tag, std::ofstream &file)
 
void WriteStartElement (std::string &tag, std::ofstream &file)
 
 XMLWriterBase ()
 
- 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 *)
 
unsigned long AddObserver (const EventObject &event, Command *) 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)
 
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 Attributes

std::string m_Filename {}
 
T * m_InputObject {}
 
- 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 ()
 
- Protected Member Functions inherited from itk::LightProcessObject
virtual void GenerateData ()
 
 LightProcessObject ()
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
 ~LightProcessObject () override
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
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 ()
 

Member Typedef Documentation

◆ Self

template<typename T>
using itk::XMLWriterBase< T >::Self = XMLWriterBase

Definition at line 150 of file itkXMLFile.h.

Constructor & Destructor Documentation

◆ XMLWriterBase()

template<typename T>
itk::XMLWriterBase< T >::XMLWriterBase ( )
inline

Constructor Sets object pointer to zero.

Definition at line 155 of file itkXMLFile.h.

Member Function Documentation

◆ CanWriteFile()

template<typename T>
virtual int itk::XMLWriterBase< T >::CanWriteFile ( const char *  name)
pure virtual

Return non-zero if the filename given is writable.

Implemented in itk::PolygonGroupSpatialObjectXMLFileWriter.

◆ GetFilename()

template<typename T>
virtual const char* itk::XMLWriterBase< T >::GetFilename ( ) const
virtual

Get the filename to write

◆ SetFilename()

template<typename T>
virtual void itk::XMLWriterBase< T >::SetFilename ( const char *  _arg)
virtual

Set the filename to write

◆ SetObject()

template<typename T>
void itk::XMLWriterBase< T >::SetObject ( T *  toWrite)
inline

Give a pointer to the object to be written out to an XML file.

Definition at line 169 of file itkXMLFile.h.

◆ WriteCharacterData() [1/2]

template<typename T>
void itk::XMLWriterBase< T >::WriteCharacterData ( const char *const  data,
std::ofstream &  file 
)
inline

Write character data inside a tag.

Definition at line 195 of file itkXMLFile.h.

◆ WriteCharacterData() [2/2]

template<typename T>
void itk::XMLWriterBase< T >::WriteCharacterData ( std::string &  data,
std::ofstream &  file 
)
inline

Write character data inside a tag.

Definition at line 216 of file itkXMLFile.h.

◆ WriteEndElement() [1/2]

template<typename T>
void itk::XMLWriterBase< T >::WriteEndElement ( const char *const  tag,
std::ofstream &  file 
)
inline

Write an end element tag

Definition at line 188 of file itkXMLFile.h.

◆ WriteEndElement() [2/2]

template<typename T>
void itk::XMLWriterBase< T >::WriteEndElement ( std::string &  tag,
std::ofstream &  file 
)
inline

Write an end element tag

Definition at line 209 of file itkXMLFile.h.

◆ WriteFile()

template<typename T>
virtual int itk::XMLWriterBase< T >::WriteFile ( )
pure virtual

Write the XML file, based on the Input Object

Implemented in itk::PolygonGroupSpatialObjectXMLFileWriter.

◆ WriteStartElement() [1/2]

template<typename T>
void itk::XMLWriterBase< T >::WriteStartElement ( const char *const  tag,
std::ofstream &  file 
)
inline

Write out a start element tag

Definition at line 181 of file itkXMLFile.h.

◆ WriteStartElement() [2/2]

template<typename T>
void itk::XMLWriterBase< T >::WriteStartElement ( std::string &  tag,
std::ofstream &  file 
)
inline

Write a start element tag

Definition at line 202 of file itkXMLFile.h.

Member Data Documentation

◆ m_Filename

template<typename T>
std::string itk::XMLWriterBase< T >::m_Filename {}
protected

Definition at line 224 of file itkXMLFile.h.

◆ m_InputObject

template<typename T>
T* itk::XMLWriterBase< T >::m_InputObject {}
protected

Definition at line 223 of file itkXMLFile.h.


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