Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-11 09:18:19

0001 // Created on: 2001-06-26
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_BasicNode_HeaderFile
0017 #define LDOM_BasicNode_HeaderFile
0018 
0019 #include <LDOM_Node.hxx>
0020 
0021 class LDOM_NullPtr;
0022 
0023 //  Block of comments describing class LDOM_BasicNode
0024 //
0025 
0026 class LDOM_BasicNode
0027 {
0028 public:
0029   DEFINE_STANDARD_ALLOC
0030 
0031 public:
0032   bool isNull() const { return myNodeType == LDOM_Node::UNKNOWN; }
0033 
0034   LDOM_Node::NodeType getNodeType() const { return myNodeType; }
0035 
0036   Standard_EXPORT const LDOM_BasicNode* GetSibling() const;
0037 
0038 protected:
0039   // ---------- PROTECTED METHODS ----------
0040 
0041   LDOM_BasicNode()
0042       : myNodeType(LDOM_Node::UNKNOWN),
0043         mySibling(nullptr)
0044   {
0045   }
0046 
0047   //    Empty constructor
0048 
0049   LDOM_BasicNode(LDOM_Node::NodeType aType)
0050       : myNodeType(aType),
0051         mySibling(nullptr)
0052   {
0053   }
0054 
0055   //    Constructor
0056 
0057   LDOM_BasicNode(const LDOM_BasicNode& anOther)
0058       : myNodeType(anOther.getNodeType()),
0059         mySibling(anOther.GetSibling())
0060   {
0061   }
0062 
0063   //    Copy constructor
0064 
0065   LDOM_BasicNode& operator=(const LDOM_NullPtr*)
0066   {
0067     myNodeType = LDOM_Node::UNKNOWN;
0068     return *this;
0069   }
0070 
0071   Standard_EXPORT LDOM_BasicNode& operator=(const LDOM_BasicNode& anOther);
0072 
0073   void SetSibling(const LDOM_BasicNode* anOther) { mySibling = anOther; }
0074 
0075 protected:
0076   friend class LDOM_BasicElement;
0077   friend class LDOM_Node;
0078   friend class LDOMParser;
0079   // ---------- PROTECTED FIELDSS ----------
0080 
0081   LDOM_Node::NodeType   myNodeType;
0082   const LDOM_BasicNode* mySibling;
0083 };
0084 
0085 #endif