summaryrefslogtreecommitdiff
path: root/src/xmlfilewriter.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2007-04-03 03:49:53 +0000
committerMike Buland <eichlan@xagasoft.com>2007-04-03 03:49:53 +0000
commitf4c20290509d7ed3a8fd5304577e7a4cc0b9d974 (patch)
tree13cdf64f7cf134f397a7165b7a3fe0807e37026b /src/xmlfilewriter.h
parent74d4c8cd27334fc7204d5a8773deb3d424565778 (diff)
downloadlibbu++-f4c20290509d7ed3a8fd5304577e7a4cc0b9d974.tar.gz
libbu++-f4c20290509d7ed3a8fd5304577e7a4cc0b9d974.tar.bz2
libbu++-f4c20290509d7ed3a8fd5304577e7a4cc0b9d974.tar.xz
libbu++-f4c20290509d7ed3a8fd5304577e7a4cc0b9d974.zip
Ok, no code is left in src, it's all in src/old. We'll gradually move code back
into src as it's fixed and re-org'd. This includes tests, which, I may write a unit test system into libbu++ just to make my life easier.
Diffstat (limited to 'src/xmlfilewriter.h')
-rw-r--r--src/xmlfilewriter.h45
1 files changed, 0 insertions, 45 deletions
diff --git a/src/xmlfilewriter.h b/src/xmlfilewriter.h
deleted file mode 100644
index e328f96..0000000
--- a/src/xmlfilewriter.h
+++ /dev/null
@@ -1,45 +0,0 @@
1#ifndef XML_FILE_WRITER
2#define XML_FILE_WRITER
3
4#include "xmlnode.h"
5#include "xmlwriter.h"
6
7/**
8 * Implements xml writing in the XML standard format. Also allows you to
9 * break that format and auto-indent your exported xml data for ease of
10 * reading. The auto-indenting will only be applied to sections that
11 * have no content of their own already. This means that except for
12 * whitespace all of your data will be preserved perfectly.
13 * You can create an XmlWriter object around a file, or access the static
14 * write function directly and just hand it a filename and a root XmlNode.
15 * When using an XmlWriter object the interface is identicle to that of
16 * the XmlDocument class, so reference that class for API info. However
17 * when the initial (or root) node is closed, and the document is finished
18 * the file will be created and written to automatically. The user can
19 * check to see if this is actually true by calling the isFinished
20 * function in the XmlDocument class.
21 *@author Mike Buland
22 */
23class XmlFileWriter : public XmlWriter
24{
25public:
26 /**
27 * Construct a file writer around a given file.
28 *@param sFileName The file to create or overwrite and write XML into.
29 *@param sIndent The indent text to use, if any.
30 */
31 XmlFileWriter( const char *sFileName, const char *sIndent=NULL, XmlNode *pRoot=NULL );
32 XmlFileWriter( FILE *fh, const char *sIndent=NULL, XmlNode *pRoot=NULL );
33
34 /**
35 * Destroy the writer.
36 */
37 virtual ~XmlFileWriter();
38
39private:
40 void writeString( const char *sString );
41 std::string sFileName; /**< The filename to write to. */
42 FILE *fh; /**< The file handle to the open file. */
43};
44
45#endif