| 1 |
|
/*========================================================================= |
| 2 |
|
|
| 3 |
|
Program: Insight Segmentation & Registration Toolkit |
| 4 |
|
Module: $RCSfile: itkXMLFileOutputWindow.h.html,v $ |
| 5 |
|
Language: C++ |
| 6 |
|
Date: $Date: 2006/01/17 19:15:49 $ |
| 7 |
|
Version: $Revision: 1.4 $ |
| 8 |
|
|
| 9 |
|
Copyright (c) Insight Software Consortium. All rights reserved. |
| 10 |
|
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. |
| 11 |
|
|
| 12 |
|
This software is distributed WITHOUT ANY WARRANTY; without even |
| 13 |
|
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 14 |
|
PURPOSE. See the above copyright notices for more information. |
| 15 |
|
|
| 16 |
|
=========================================================================*/ |
| 17 |
|
#ifndef __itkXMLFileOutputWindow_h |
| 18 |
|
#define __itkXMLFileOutputWindow_h |
| 19 |
|
|
| 20 |
|
#include "itkFileOutputWindow.h" |
| 21 |
|
|
| 22 |
|
namespace itk |
| 23 |
|
{ |
| 24 |
|
/** \class XMLFileOutputWindow |
| 25 |
LEN |
* \brief Messages sent from the system are sent to a file with each message enclosed by XML tags. |
| 26 |
|
* |
| 27 |
|
* Writes debug/warning/error output to an XML file. Uses predefined XML |
| 28 |
|
* tags for each text display method. The text is processed to replace |
| 29 |
|
* XML markup characters. |
| 30 |
|
* |
| 31 |
|
* DisplayText - <Text> |
| 32 |
|
* |
| 33 |
|
* DisplayErrorText - <Error> |
| 34 |
|
* |
| 35 |
|
* DisplayWarningText - <Warning> |
| 36 |
|
* |
| 37 |
|
* DisplayGenericOutputText - <GenericOutput> |
| 38 |
|
* |
| 39 |
|
* DisplayDebugText - <Debug> |
| 40 |
|
* |
| 41 |
|
* The method DisplayTag outputs the text unprocessed. To use this |
| 42 |
|
* class, instantiate it and then call SetInstance(this). |
| 43 |
|
* |
| 44 |
|
* \ingroup OSSystemObjects |
| 45 |
|
*/ |
| 46 |
|
class ITKCommon_EXPORT XMLFileOutputWindow : public FileOutputWindow |
| 47 |
|
{ |
| 48 |
|
public: |
| 49 |
|
/** Standard class typedefs. */ |
| 50 |
|
typedef XMLFileOutputWindow Self; |
| 51 |
TDA |
typedef FileOutputWindow Superclass; |
| 52 |
TDA |
typedef SmartPointer<Self> Pointer; |
| 53 |
TDA |
typedef SmartPointer<const Self> ConstPointer; |
| 54 |
|
|
| 55 |
|
/** Method for creation through the object factory. */ |
| 56 |
|
itkNewMacro(Self); |
| 57 |
|
|
| 58 |
|
/** Run-time type information (and related methods). */ |
| 59 |
|
itkTypeMacro(XMLFileOutputWindow, FileOutputWindow); |
| 60 |
|
|
| 61 |
|
/** Send a string to the XML file. */ |
| 62 |
|
virtual void DisplayText(const char*); |
| 63 |
|
|
| 64 |
|
/** Send an error string to the XML file. */ |
| 65 |
|
virtual void DisplayErrorText(const char*); |
| 66 |
|
|
| 67 |
|
/** Send a warning string to the XML file. */ |
| 68 |
|
virtual void DisplayWarningText(const char*); |
| 69 |
|
|
| 70 |
|
/** Send a generic output string to the XML file. */ |
| 71 |
|
virtual void DisplayGenericOutputText(const char*); |
| 72 |
|
|
| 73 |
|
/** Send a debug string to the XML file. */ |
| 74 |
|
virtual void DisplayDebugText(const char*); |
| 75 |
|
|
| 76 |
|
/** Put the text into the log file without processing it. */ |
| 77 |
|
virtual void DisplayTag(const char*); |
| 78 |
|
|
| 79 |
|
protected: |
| 80 |
|
XMLFileOutputWindow(); |
| 81 |
|
virtual ~XMLFileOutputWindow(); |
| 82 |
|
virtual void PrintSelf(std::ostream& os, Indent indent) const; |
| 83 |
|
void Initialize(); |
| 84 |
|
virtual void DisplayXML(const char*, const char*); |
| 85 |
|
|
| 86 |
|
private: |
| 87 |
|
XMLFileOutputWindow(const Self&); //purposely not implemented |
| 88 |
|
void operator=(const Self&); //purposely not implemented |
| 89 |
|
|
| 90 |
|
}; |
| 91 |
|
|
| 92 |
|
} // end namespace itk |
| 93 |
|
|
| 94 |
|
#endif |
| 95 |
|
|