From f4c20290509d7ed3a8fd5304577e7a4cc0b9d974 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 3 Apr 2007 03:49:53 +0000 Subject: 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. --- src/old/xmlfilewriter.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/old/xmlfilewriter.cpp (limited to 'src/old/xmlfilewriter.cpp') diff --git a/src/old/xmlfilewriter.cpp b/src/old/xmlfilewriter.cpp new file mode 100644 index 0000000..3c6fb41 --- /dev/null +++ b/src/old/xmlfilewriter.cpp @@ -0,0 +1,28 @@ +#include +#include +#include "xmlfilewriter.h" + +XmlFileWriter::XmlFileWriter( const char *sFileName, const char *sIndent, XmlNode *pRoot ) : + XmlWriter( sIndent, pRoot ) +{ + this->sFileName = sFileName; + fh = fopen( sFileName, "wt"); + fprintf( fh, "\n"); +} + +XmlFileWriter::XmlFileWriter( FILE *fh, const char *sIndent, XmlNode *pRoot ) : + XmlWriter( sIndent, pRoot ), + fh( fh ) +{ +} + +XmlFileWriter::~XmlFileWriter() +{ + fclose( fh ); +} + +void XmlFileWriter::writeString( const char *sString ) +{ + fputs( sString, fh ); +} + -- cgit v1.2.3