18 #ifndef __itkXMLFile_h
19 #define __itkXMLFile_h
40 itkSetStringMacro(Filename);
43 itkGetStringMacro(Filename);
54 virtual void StartElement(
const char *name,
const char **atts) = 0;
92 template<
typename T >
127 template<
typename T >
142 itkSetStringMacro(Filename);
145 itkGetStringMacro(Filename);
159 file << '<' << tag << '>
';
163 void WriteEndElement(const char *const tag, std::ofstream & file)
165 file << '<
' << '/
' << tag << '>
';
169 void WriteCharacterData(const char *const data, std::ofstream & file)
175 void WriteStartElement(std::string & tag, std::ofstream & file)
177 WriteStartElement(tag.c_str(), file);
181 void WriteEndElement(std::string & tag, std::ofstream & file)
183 WriteEndElement(tag.c_str(), file);
187 void WriteCharacterData(std::string & data, std::ofstream & file)
189 WriteCharacterData(data.c_str(), file);
193 T *m_InputObject; // object to write out to an XML file
194 std::string m_Filename; // name of file to write.
197 XMLWriterBase(const Self &); //purposely not implemented
198 void operator=(const Self &); //purposely not implemented
T * GetOutputObject(void)
Light weight base class for most itk classes.
void PrintSelf(std::ostream &os, Indent indent) const
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)