File indexing completed on 2025-01-18 10:04:12
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef LDOM_XmlWriter_HeaderFile
0017 #define LDOM_XmlWriter_HeaderFile
0018
0019 #include <Standard_OStream.hxx>
0020 #include <Standard_TypeDef.hxx>
0021
0022 class LDOM_Document;
0023 class LDOM_Node;
0024 class LDOMBasicString;
0025
0026 class LDOM_XmlWriter
0027 {
0028 public:
0029
0030 Standard_EXPORT LDOM_XmlWriter (const char* theEncoding = NULL);
0031
0032 Standard_EXPORT ~LDOM_XmlWriter ();
0033
0034
0035 void SetIndentation (const Standard_Integer theIndent) { myIndent = theIndent; }
0036
0037 Standard_EXPORT void Write (Standard_OStream& theOStream, const LDOM_Document& theDoc);
0038
0039
0040
0041
0042 Standard_EXPORT void Write (Standard_OStream& theOStream, const LDOM_Node& theNode);
0043
0044 private:
0045
0046 LDOM_XmlWriter (const LDOM_XmlWriter& anOther);
0047
0048 LDOM_XmlWriter& operator = (const LDOM_XmlWriter& anOther);
0049
0050 void Write (Standard_OStream& theOStream, const LDOMBasicString& theString);
0051 void Write (Standard_OStream& theOStream, const char* theString);
0052 void Write (Standard_OStream& theOStream, const char theChar);
0053
0054 void WriteAttribute (Standard_OStream& theOStream, const LDOM_Node& theAtt);
0055
0056 private:
0057
0058 char* myEncodingName;
0059 Standard_Integer myIndent;
0060 Standard_Integer myCurIndent;
0061 char* myABuffer;
0062 Standard_Integer myABufferLen;
0063 };
0064
0065 #endif