Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:12

0001 // Created on: 2001-06-25
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_Document_HeaderFile
0017 #define LDOM_Document_HeaderFile
0018 
0019 #include <LDOM_Element.hxx>
0020 #include <LDOM_CDATASection.hxx>
0021 #include <LDOM_Comment.hxx>
0022 
0023 
0024 //  Class LDOM_Document
0025 
0026 class LDOM_Document 
0027 {
0028  public:
0029   // ---------- PUBLIC METHODS ----------
0030   Standard_EXPORT LDOM_Document ();
0031   // Empty constructor
0032 
0033   Standard_EXPORT LDOM_Document (const LDOM_MemManager& aMemManager);
0034   // Called by LDOM_MemManager::Doc()
0035 
0036 //  Standard_EXPORT LDOM_Document (const LDOM_Document& theOther);
0037   // Copy constructor
0038 
0039   Standard_EXPORT ~LDOM_Document ();
0040   // Destructor
0041 
0042   // ---- CREATE ----
0043 
0044   static Standard_EXPORT LDOM_Document
0045                 createDocument          (const LDOMString& theQualifiedName);
0046   // Create an empty document
0047 
0048   Standard_EXPORT LDOM_Element
0049                 createElement           (const LDOMString& theTagName);
0050 
0051 //  Standard_EXPORT LDOM_Element
0052 //                createElementNS         (const LDOMString& theNSuri,
0053 //                                         const LDOMString& theQualName);
0054 
0055   Standard_EXPORT LDOM_CDATASection
0056                 createCDATASection      (const LDOMString& theData);
0057 
0058   Standard_EXPORT LDOM_Comment
0059                 createComment           (const LDOMString& theData);
0060 
0061   Standard_EXPORT LDOM_Text
0062                 createTextNode          (const LDOMString& theData);
0063 
0064   // ---- GET ----
0065 
0066   Standard_EXPORT LDOM_Element
0067                 getDocumentElement      () const;
0068 
0069   Standard_EXPORT LDOM_NodeList
0070                 getElementsByTagName    (const LDOMString& theTagName) const;
0071 
0072   // ---- COMPARE ----
0073 
0074   Standard_Boolean
0075                 operator ==             (const LDOM_Document& anOther) const
0076                                 { return myMemManager == anOther.myMemManager; }
0077 
0078   Standard_Boolean
0079                 operator !=             (const LDOM_Document& anOther) const
0080                                 { return myMemManager != anOther.myMemManager; }
0081 
0082   Standard_Boolean
0083                 operator ==             (const LDOM_NullPtr *) const;
0084   Standard_Boolean
0085                 operator !=             (const LDOM_NullPtr *) const;
0086 
0087   Standard_EXPORT Standard_Boolean
0088                 isNull                  () const;
0089 
0090   // ---- UTIL ----
0091 
0092   Standard_EXPORT LDOM_Document&
0093                 operator =              (const LDOM_NullPtr *);
0094 
0095  private:
0096   friend class LDOM_LDOMImplementation;
0097   friend class LDOMString;
0098   friend class LDOM_Node;
0099   // ---------- PRIVATE FIELDS ----------
0100 
0101   Handle(LDOM_MemManager)       myMemManager;
0102 };
0103 
0104 #endif