Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/LDOM_XmlWriter.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 2001-06-28
0002 // Created by: Alexander GRIGORIEV
0003 // Copyright (c) 2001-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
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   Standard_EXPORT LDOM_XmlWriter(const char* theEncoding = NULL);
0030 
0031   Standard_EXPORT ~LDOM_XmlWriter();
0032 
0033   // Set indentation for output (by default 0)
0034   void SetIndentation(const Standard_Integer theIndent) { myIndent = theIndent; }
0035 
0036   Standard_EXPORT void Write(Standard_OStream& theOStream, const LDOM_Document& theDoc);
0037 
0038   //  Stream out a DOM node, and, recursively, all of its children. This
0039   //  function is the heart of writing a DOM tree out as XML source. Give it
0040   //  a document node and it will do the whole thing.
0041   Standard_EXPORT void Write(Standard_OStream& theOStream, const LDOM_Node& theNode);
0042 
0043 private:
0044   LDOM_XmlWriter(const LDOM_XmlWriter& anOther);
0045 
0046   LDOM_XmlWriter& operator=(const LDOM_XmlWriter& anOther);
0047 
0048   void Write(Standard_OStream& theOStream, const LDOMBasicString& theString);
0049   void Write(Standard_OStream& theOStream, const char* theString);
0050   void Write(Standard_OStream& theOStream, const char theChar);
0051 
0052   void WriteAttribute(Standard_OStream& theOStream, const LDOM_Node& theAtt);
0053 
0054 private:
0055   char*            myEncodingName;
0056   Standard_Integer myIndent;
0057   Standard_Integer myCurIndent;
0058   char*            myABuffer;
0059   Standard_Integer myABufferLen;
0060 };
0061 
0062 #endif