0026576: Wrong result obtained by intersection algorithm.
[occt.git] / src / LDOM / LDOM_XmlWriter.hxx
CommitLineData
b311480e 1// Created on: 2001-06-28
2// Created by: Alexander GRIGORIEV
973c2be1 3// Copyright (c) 2001-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
b311480e 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
7fd59977 15
16#ifndef LDOM_XmlWriter_HeaderFile
17#define LDOM_XmlWriter_HeaderFile
18
19#include <Standard_TypeDef.hxx>
20#include <stdio.h>
21
22typedef char LXMLCh;
23
24class LDOM_Document;
25class LDOM_Node;
26class LDOMBasicString;
27
28class LDOM_XmlWriter
29{
30 public:
31
32 Standard_EXPORT LDOM_XmlWriter (FILE * aFile, const char * theEncoding= NULL);
33 // Constructor
34
35 Standard_EXPORT ~LDOM_XmlWriter ();
36 // Destructor
37
38 void SetIndentation (const Standard_Integer theIndent) { myIndent=theIndent; }
39 // Set indentation for output (by default 0)
40
41 Standard_EXPORT LDOM_XmlWriter& operator<< (const LDOM_Document& aDoc);
42
43 Standard_EXPORT LDOM_XmlWriter& operator<< (const LDOM_Node& toWrite);
44 // ostream << DOM_Node
45 // Stream out a DOM node, and, recursively, all of its children. This
46 // function is the heart of writing a DOM tree out as XML source. Give it
47 // a document node and it will do the whole thing.
48
49 private:
50
51 void WriteAttribute (const LDOM_Node& theAtt);
52
53 LDOM_XmlWriter& operator<< (const LDOMBasicString&);
54 // Stream out LDOM String
55
56 inline LDOM_XmlWriter& operator<< (const LXMLCh * toWrite);
57 // Stream out a character string. Doing this requires that we first transcode
58 // to char * form in the default code page for the system
59
60 inline LDOM_XmlWriter& operator << (const LXMLCh aChar);
61
62 LDOM_XmlWriter (const LDOM_XmlWriter& anOther);
63 // Copy constructor - prohibited
64
65 LDOM_XmlWriter& operator = (const LDOM_XmlWriter& anOther);
66 // Assignment operator - prohibited
67
68 private:
69
70 FILE * myFile;
71 LXMLCh * myEncodingName;
72 Standard_Integer myIndent;
73 Standard_Integer myCurIndent;
74 char * myABuffer; // for WriteAttribute()
75 Standard_Integer myABufferLen; // for WriteAttribute()
76};
77
78#endif