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;
91 template<
typename T >
128 template<
typename T >
143 itkSetStringMacro(Filename);
146 itkGetStringMacro(Filename);
160 file << '<' << tag << '>
';
164 void WriteEndElement(const char *const tag, std::ofstream & file)
166 file << '<
' << '/
' << tag << '>
';
170 void WriteCharacterData(const char *const data, std::ofstream & file)
176 void WriteStartElement(std::string & tag, std::ofstream & file)
178 WriteStartElement(tag.c_str(), file);
182 void WriteEndElement(std::string & tag, std::ofstream & file)
184 WriteEndElement(tag.c_str(), file);
188 void WriteCharacterData(std::string & data, std::ofstream & file)
190 WriteCharacterData(data.c_str(), file);
194 T *m_InputObject; // object to write out to an XML file
195 std::string m_Filename; // name of file to write.
198 ITK_DISALLOW_COPY_AND_ASSIGN(XMLWriterBase);
T * GetOutputObject(void)
virtual int WriteFile()=0
void SetOutputObject(T *obj)
virtual int CanWriteFile(const char *name)=0
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)
virtual ~XMLReaderBase() override