21 #include "ITKIOXMLExport.h"
42 itkSetStringMacro(Filename);
45 itkGetStringMacro(Filename);
48 virtual int CanReadFile(
const char *name) = 0;
51 virtual void GenerateOutputInformation();
56 virtual void StartElement(
const char *name,
const char **atts) = 0;
61 virtual void EndElement(
const char *name) = 0;
66 virtual void CharacterDataHandler(
const char *inData,
int inLength) = 0;
71 void PrintSelf(std::ostream & os,
Indent indent)
const override;
90 template<
typename T >
109 m_OutputObject(nullptr)
126 template<
typename T >
139 m_InputObject =
nullptr;
143 itkSetStringMacro(Filename);
146 itkGetStringMacro(Filename);
149 virtual int CanWriteFile(
const char *name) = 0;
155 virtual int WriteFile() = 0;
157 #if !defined( ITK_WRAPPING_PARSER )
161 file << '<' << tag << '>
';
165 void WriteEndElement(const char *const tag, std::ofstream & file)
167 file << '<
' << '/
' << tag << '>
';
171 void WriteCharacterData(const char *const data, std::ofstream & file)
177 void WriteStartElement(std::string & tag, std::ofstream & file)
179 WriteStartElement(tag.c_str(), file);
183 void WriteEndElement(std::string & tag, std::ofstream & file)
185 WriteEndElement(tag.c_str(), file);
189 void WriteCharacterData(std::string & data, std::ofstream & file)
191 WriteCharacterData(data.c_str(), file);
196 T *m_InputObject; // object to write out to an XML file
197 std::string m_Filename; // name of file to write.
Light weight base class for most itk classes.
void SetOutputObject(T *obj)
void SetObject(T *toWrite)
template base class for an XMLReader It's purpose really is just to define the simple interface for e...
LightProcessObject is the base class for all process objects (source, filters, mappers) in the Insigh...
Control indentation during Print() invocation.
void WriteStartElement(const char *const tag, std::ofstream &file)