1 // Created on: 2001-06-25
2 // Created by: Alexander GRIGORIEV
3 // Copyright (c) 2001-2012 OPEN CASCADE SAS
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.
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.
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.
22 #ifndef LDOM_Document_HeaderFile
23 #define LDOM_Document_HeaderFile
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>
31 // Class LDOM_Document
36 // ---------- PUBLIC METHODS ----------
37 Standard_EXPORT LDOM_Document ();
40 Standard_EXPORT LDOM_Document (const LDOM_MemManager& aMemManager);
41 // Called by LDOM_MemManager::Doc()
43 // Standard_EXPORT LDOM_Document (const LDOM_Document& theOther);
46 Standard_EXPORT ~LDOM_Document ();
51 static Standard_EXPORT LDOM_Document
52 createDocument (const LDOMString& theQualifiedName);
53 // Create an empty document
55 Standard_EXPORT LDOM_Element
56 createElement (const LDOMString& theTagName);
58 // Standard_EXPORT LDOM_Element
59 // createElementNS (const LDOMString& theNSuri,
60 // const LDOMString& theQualName);
62 Standard_EXPORT LDOM_CDATASection
63 createCDATASection (const LDOMString& theData);
65 Standard_EXPORT LDOM_Comment
66 createComment (const LDOMString& theData);
68 Standard_EXPORT LDOM_Text
69 createTextNode (const LDOMString& theData);
73 Standard_EXPORT LDOM_Element
74 getDocumentElement () const;
76 Standard_EXPORT LDOM_NodeList
77 getElementsByTagName (const LDOMString& theTagName) const;
82 operator == (const LDOM_Document& anOther) const
83 { return myMemManager == anOther.myMemManager; }
86 operator != (const LDOM_Document& anOther) const
87 { return myMemManager != anOther.myMemManager; }
90 operator == (const LDOM_NullPtr *) const;
92 operator != (const LDOM_NullPtr *) const;
94 Standard_EXPORT Standard_Boolean
99 Standard_EXPORT LDOM_Document&
100 operator = (const LDOM_NullPtr *);
103 friend class LDOM_LDOMImplementation;
104 friend class LDOMString;
105 friend class LDOM_Node;
106 // ---------- PRIVATE FIELDS ----------
108 Handle(LDOM_MemManager) myMemManager;