Back to home page

EIC code displayed by LXR

 
 

    


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

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 
0033   Standard_Boolean  isNull    () const {return myNodeType ==LDOM_Node::UNKNOWN;}
0034 
0035   LDOM_Node::NodeType getNodeType () const { return myNodeType; }
0036 
0037   Standard_EXPORT const LDOM_BasicNode * GetSibling () const;
0038 
0039  protected:
0040   // ---------- PROTECTED METHODS ----------
0041 
0042   LDOM_BasicNode () : myNodeType (LDOM_Node::UNKNOWN), mySibling (NULL) {}
0043   //    Empty constructor
0044 
0045   LDOM_BasicNode (LDOM_Node::NodeType aType)
0046     : myNodeType (aType), mySibling (NULL) {}
0047   //    Constructor
0048 
0049   LDOM_BasicNode (const LDOM_BasicNode& anOther)
0050     : myNodeType (anOther.getNodeType()), mySibling (anOther.GetSibling()) {}
0051   //    Copy constructor
0052 
0053   LDOM_BasicNode& operator =    (const LDOM_NullPtr * )
0054                               { myNodeType = LDOM_Node::UNKNOWN; return *this; }
0055 
0056   Standard_EXPORT LDOM_BasicNode& operator = (const LDOM_BasicNode& anOther);
0057 
0058   void SetSibling (const LDOM_BasicNode * anOther)      { mySibling = anOther; }
0059 
0060  protected:
0061   friend class LDOM_BasicElement;
0062   friend class LDOM_Node;
0063   friend class LDOMParser;
0064   // ---------- PROTECTED FIELDSS ----------
0065 
0066   LDOM_Node::NodeType   myNodeType;
0067   const LDOM_BasicNode  * mySibling;
0068 };
0069 
0070 #endif