00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef LocalFileFormatTarget_HEADER_GUARD_
00022 #define LocalFileFormatTarget_HEADER_GUARD_
00023
00024 #include <xercesc/framework/XMLFormatter.hpp>
00025
00026 XERCES_CPP_NAMESPACE_BEGIN
00027
00028 class LocalFileFormatTarget : public XMLFormatTarget {
00029 public:
00030
00033 LocalFileFormatTarget
00034 (
00035 const XMLCh* const
00036 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00037 );
00038
00039 LocalFileFormatTarget
00040 (
00041 const char* const
00042 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00043 );
00044
00045 ~LocalFileFormatTarget();
00047
00048
00049
00050
00051 virtual void writeChars(const XMLByte* const toWrite
00052 , const unsigned int count
00053 , XMLFormatter* const formatter);
00054
00055 virtual void flush();
00056
00057 private:
00058
00059
00060
00061 LocalFileFormatTarget(const LocalFileFormatTarget&);
00062 LocalFileFormatTarget& operator=(const LocalFileFormatTarget&);
00063
00064
00065
00066
00067 void flushBuffer();
00068 bool insureCapacity(const unsigned int extraNeeded);
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089 FileHandle fSource;
00090 XMLByte* fDataBuf;
00091 unsigned int fIndex;
00092 unsigned int fCapacity;
00093 MemoryManager* fMemoryManager;
00094 };
00095
00096
00097 XERCES_CPP_NAMESPACE_END
00098
00099 #endif
00100