0023934: Compiler warnings in MS VC++ 10
[occt.git] / src / LDOM / LDOM_Document.hxx
1 // Created on: 2001-06-25
2 // Created by: Alexander GRIGORIEV
3 // Copyright (c) 2001-2012 OPEN CASCADE SAS
4 //
5 // The content of this file is subject to the Open CASCADE Technology Public
6 // License Version 6.5 (the "License"). You may not use the content of this file
7 // except in compliance with the License. Please obtain a copy of the License
8 // at http://www.opencascade.org and read it completely before using this file.
9 //
10 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 //
13 // The Original Code and all software distributed under the License is
14 // distributed on an "AS IS" basis, without warranty of any kind, and the
15 // Initial Developer hereby disclaims all such warranties, including without
16 // limitation, any warranties of merchantability, fitness for a particular
17 // purpose or non-infringement. Please see the License for the specific terms
18 // and conditions governing the rights and limitations under the License.
19
20
21
22 #ifndef LDOM_Document_HeaderFile
23 #define LDOM_Document_HeaderFile
24
25 #include <LDOM_Element.hxx>
26 #include <Handle_LDOM_MemManager.hxx>
27 #include <LDOM_Text.hxx>
28 #include <LDOM_CDATASection.hxx>
29 #include <LDOM_Comment.hxx>
30
31 //  Class LDOM_Document
32
33 class LDOM_Document 
34 {
35  public:
36   // ---------- PUBLIC METHODS ----------
37   Standard_EXPORT LDOM_Document ();
38   // Empty constructor
39
40   Standard_EXPORT LDOM_Document (const LDOM_MemManager& aMemManager);
41   // Called by LDOM_MemManager::Doc()
42
43 //  Standard_EXPORT LDOM_Document (const LDOM_Document& theOther);
44   // Copy constructor
45
46   Standard_EXPORT ~LDOM_Document ();
47   // Destructor
48
49   // ---- CREATE ----
50
51   static Standard_EXPORT LDOM_Document
52                 createDocument          (const LDOMString& theQualifiedName);
53   // Create an empty document
54
55   Standard_EXPORT LDOM_Element
56                 createElement           (const LDOMString& theTagName);
57
58 //  Standard_EXPORT LDOM_Element
59 //                createElementNS         (const LDOMString& theNSuri,
60 //                                         const LDOMString& theQualName);
61
62   Standard_EXPORT LDOM_CDATASection
63                 createCDATASection      (const LDOMString& theData);
64
65   Standard_EXPORT LDOM_Comment
66                 createComment           (const LDOMString& theData);
67
68   Standard_EXPORT LDOM_Text
69                 createTextNode          (const LDOMString& theData);
70
71   // ---- GET ----
72
73   Standard_EXPORT LDOM_Element
74                 getDocumentElement      () const;
75
76   Standard_EXPORT LDOM_NodeList
77                 getElementsByTagName    (const LDOMString& theTagName) const;
78
79   // ---- COMPARE ----
80
81   Standard_Boolean
82                 operator ==             (const LDOM_Document& anOther) const
83                                 { return myMemManager == anOther.myMemManager; }
84
85   Standard_Boolean
86                 operator !=             (const LDOM_Document& anOther) const
87                                 { return myMemManager != anOther.myMemManager; }
88
89   Standard_Boolean
90                 operator ==             (const LDOM_NullPtr *) const;
91   Standard_Boolean
92                 operator !=             (const LDOM_NullPtr *) const;
93
94   Standard_EXPORT Standard_Boolean
95                 isNull                  () const;
96
97   // ---- UTIL ----
98
99   Standard_EXPORT LDOM_Document&
100                 operator =              (const LDOM_NullPtr *);
101
102  private:
103   friend class LDOM_LDOMImplementation;
104   friend class LDOMString;
105   friend class LDOM_Node;
106   // ---------- PRIVATE FIELDS ----------
107
108   Handle(LDOM_MemManager)       myMemManager;
109 };
110
111 #endif