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 &);
92 template<
typename T >
130 template<
typename T >
145 itkSetStringMacro(Filename);
148 itkGetStringMacro(Filename);
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 &); //purposely not implemented
201 void operator=(const Self &); //purposely not implemented
T * GetOutputObject(void)
Light weight base class for most itk classes.
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...
void operator=(const Self &)
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)