b311480e |
1 | // Created on: 2001-06-26 |
2 | // Created by: Alexander GRIGORIEV |
973c2be1 |
3 | // Copyright (c) 2001-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
7fd59977 |
15 | |
16 | #ifndef LDOM_BasicNode_HeaderFile |
17 | #define LDOM_BasicNode_HeaderFile |
18 | |
19 | #include <LDOM_Node.hxx> |
20 | |
21 | class LDOM_BasicElement; |
22 | class LDOM_NullPtr; |
23 | class LDOMParser; |
24 | |
25 | // Block of comments describing class LDOM_BasicNode |
26 | // |
27 | |
28 | class LDOM_BasicNode |
29 | { |
1c35b92f |
30 | public: |
31 | DEFINE_STANDARD_ALLOC |
32 | |
7fd59977 |
33 | public: |
34 | |
35 | Standard_Boolean isNull () const {return myNodeType ==LDOM_Node::UNKNOWN;} |
36 | |
37 | LDOM_Node::NodeType getNodeType () const { return myNodeType; } |
38 | |
39 | Standard_EXPORT const LDOM_BasicNode * GetSibling () const; |
40 | |
41 | protected: |
42 | // ---------- PROTECTED METHODS ---------- |
43 | |
44 | LDOM_BasicNode () : myNodeType (LDOM_Node::UNKNOWN), mySibling (NULL) {} |
45 | // Empty constructor |
46 | |
47 | LDOM_BasicNode (LDOM_Node::NodeType aType) |
48 | : myNodeType (aType), mySibling (NULL) {} |
49 | // Constructor |
50 | |
51 | LDOM_BasicNode (const LDOM_BasicNode& anOther) |
52 | : myNodeType (anOther.getNodeType()), mySibling (anOther.GetSibling()) {} |
53 | // Copy constructor |
54 | |
55 | LDOM_BasicNode& operator = (const LDOM_NullPtr * ) |
56 | { myNodeType = LDOM_Node::UNKNOWN; return *this; } |
57 | |
58 | Standard_EXPORT LDOM_BasicNode& operator = (const LDOM_BasicNode& anOther); |
59 | |
60 | void SetSibling (const LDOM_BasicNode * anOther) { mySibling = anOther; } |
61 | |
62 | protected: |
63 | friend class LDOM_BasicElement; |
64 | friend class LDOM_Node; |
65 | friend class LDOMParser; |
66 | // ---------- PROTECTED FIELDSS ---------- |
67 | |
68 | LDOM_Node::NodeType myNodeType; |
69 | const LDOM_BasicNode * mySibling; |
70 | }; |
71 | |
72 | #endif |