18 #ifndef __itkXMLFile_h
19 #define __itkXMLFile_h
39 itkSetStringMacro(Filename);
42 itkGetStringMacro(Filename);
53 virtual void StartElement(
const char *name,
const char **atts) = 0;
68 virtual void PrintSelf(std::ostream & os,
Indent indent)
const ITK_OVERRIDE;
91 template<
typename T >
129 template<
typename T >
144 itkSetStringMacro(Filename);
147 itkGetStringMacro(Filename);
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);
195 T *m_InputObject; // object to write out to an XML file
196 std::string m_Filename; // name of file to write.
199 XMLWriterBase(const Self &); //purposely not implemented
200 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)
void operator=(const Self &)
virtual int CanReadFile(const char *name)=0
virtual int CanWriteFile(const char *name)=0
virtual void EndElement(const char *name)=0
void SetObject(T *toWrite)
virtual void StartElement(const char *name, const char **atts)=0
virtual void CharacterDataHandler(const char *inData, int inLength)=0
template base class for an XMLReader It's purpose really is just to define the simple interface for e...
virtual void GenerateOutputInformation()
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)
virtual void PrintSelf(std::ostream &os, Indent indent) const ITK_OVERRIDE