1 // Created on: 2001-06-26
2 // Created by: Alexander GRIGORIEV
3 // Copyright (c) 2001-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef LDOM_BasicNode_HeaderFile
17 #define LDOM_BasicNode_HeaderFile
19 #include <LDOM_Node.hxx>
21 class LDOM_BasicElement;
25 // Block of comments describing class LDOM_BasicNode
35 Standard_Boolean isNull () const {return myNodeType ==LDOM_Node::UNKNOWN;}
37 LDOM_Node::NodeType getNodeType () const { return myNodeType; }
39 Standard_EXPORT const LDOM_BasicNode * GetSibling () const;
42 // ---------- PROTECTED METHODS ----------
44 LDOM_BasicNode () : myNodeType (LDOM_Node::UNKNOWN), mySibling (NULL) {}
47 LDOM_BasicNode (LDOM_Node::NodeType aType)
48 : myNodeType (aType), mySibling (NULL) {}
51 LDOM_BasicNode (const LDOM_BasicNode& anOther)
52 : myNodeType (anOther.getNodeType()), mySibling (anOther.GetSibling()) {}
55 LDOM_BasicNode& operator = (const LDOM_NullPtr * )
56 { myNodeType = LDOM_Node::UNKNOWN; return *this; }
58 Standard_EXPORT LDOM_BasicNode& operator = (const LDOM_BasicNode& anOther);
60 void SetSibling (const LDOM_BasicNode * anOther) { mySibling = anOther; }
63 friend class LDOM_BasicElement;
64 friend class LDOM_Node;
65 friend class LDOMParser;
66 // ---------- PROTECTED FIELDSS ----------
68 LDOM_Node::NodeType myNodeType;
69 const LDOM_BasicNode * mySibling;