21 #include "ITKIOXMLExport.h"
40 itkSetStringMacro(Filename);
43 itkGetStringMacro(Filename);
46 virtual int CanReadFile(
const char *name) = 0;
49 virtual void GenerateOutputInformation();
54 virtual void StartElement(
const char *name,
const char **atts) = 0;
59 virtual void EndElement(
const char *name) = 0;
64 virtual void CharacterDataHandler(
const char *inData,
int inLength) = 0;
69 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
81 void operator=(const
Self &) ITK_DELETE_FUNCTION;
92 template< typename T >
109 m_OutputObject(ITK_NULLPTR)
117 XMLReader(
const Self &) ITK_DELETE_FUNCTION;
118 void operator=(const Self &) ITK_DELETE_FUNCTION;
130 template< typename T >
141 m_InputObject = ITK_NULLPTR;
145 itkSetStringMacro(Filename);
148 itkGetStringMacro(Filename);
151 virtual int CanWriteFile(
const char *name) = 0;
157 virtual int WriteFile() = 0;
162 file << '<' << tag << '>
';
166 void WriteEndElement(const char *const tag, std::ofstream & file)
168 file << '<
' << '/
' << tag << '>
';
172 void WriteCharacterData(const char *const data, std::ofstream & file)
178 void WriteStartElement(std::string & tag, std::ofstream & file)
180 WriteStartElement(tag.c_str(), file);
184 void WriteEndElement(std::string & tag, std::ofstream & file)
186 WriteEndElement(tag.c_str(), file);
190 void WriteCharacterData(std::string & data, std::ofstream & file)
192 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.
200 XMLWriterBase(const Self &) ITK_DELETE_FUNCTION;
201 void operator=(const Self &) ITK_DELETE_FUNCTION;
T * GetOutputObject(void)
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)