0031671: Coding Rules - eliminate warnings issued by clang 11
[occt.git] / src / LDOM / LDOM_Document.hxx
1 // Created on: 2001-06-25
2 // Created by: Alexander GRIGORIEV
3 // Copyright (c) 2001-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
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
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.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef LDOM_Document_HeaderFile
17 #define LDOM_Document_HeaderFile
18
19 #include <LDOM_Element.hxx>
20 #include <LDOM_Text.hxx>
21 #include <LDOM_CDATASection.hxx>
22 #include <LDOM_Comment.hxx>
23
24 class LDOM_MemManager;
25
26 //  Class LDOM_Document
27
28 class LDOM_Document 
29 {
30  public:
31   // ---------- PUBLIC METHODS ----------
32   Standard_EXPORT LDOM_Document ();
33   // Empty constructor
34
35   Standard_EXPORT LDOM_Document (const LDOM_MemManager& aMemManager);
36   // Called by LDOM_MemManager::Doc()
37
38 //  Standard_EXPORT LDOM_Document (const LDOM_Document& theOther);
39   // Copy constructor
40
41   Standard_EXPORT ~LDOM_Document ();
42   // Destructor
43
44   // ---- CREATE ----
45
46   static Standard_EXPORT LDOM_Document
47                 createDocument          (const LDOMString& theQualifiedName);
48   // Create an empty document
49
50   Standard_EXPORT LDOM_Element
51                 createElement           (const LDOMString& theTagName);
52
53 //  Standard_EXPORT LDOM_Element
54 //                createElementNS         (const LDOMString& theNSuri,
55 //                                         const LDOMString& theQualName);
56
57   Standard_EXPORT LDOM_CDATASection
58                 createCDATASection      (const LDOMString& theData);
59
60   Standard_EXPORT LDOM_Comment
61                 createComment           (const LDOMString& theData);
62
63   Standard_EXPORT LDOM_Text
64                 createTextNode          (const LDOMString& theData);
65
66   // ---- GET ----
67
68   Standard_EXPORT LDOM_Element
69                 getDocumentElement      () const;
70
71   Standard_EXPORT LDOM_NodeList
72                 getElementsByTagName    (const LDOMString& theTagName) const;
73
74   // ---- COMPARE ----
75
76   Standard_Boolean
77                 operator ==             (const LDOM_Document& anOther) const
78                                 { return myMemManager == anOther.myMemManager; }
79
80   Standard_Boolean
81                 operator !=             (const LDOM_Document& anOther) const
82                                 { return myMemManager != anOther.myMemManager; }
83
84   Standard_Boolean
85                 operator ==             (const LDOM_NullPtr *) const;
86   Standard_Boolean
87                 operator !=             (const LDOM_NullPtr *) const;
88
89   Standard_EXPORT Standard_Boolean
90                 isNull                  () const;
91
92   // ---- UTIL ----
93
94   Standard_EXPORT LDOM_Document&
95                 operator =              (const LDOM_NullPtr *);
96
97  private:
98   friend class LDOM_LDOMImplementation;
99   friend class LDOMString;
100   friend class LDOM_Node;
101   // ---------- PRIVATE FIELDS ----------
102
103   Handle(LDOM_MemManager)       myMemManager;
104 };
105
106 #endif