vtf-logo

HDSNode.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00010 #if !defined(__HDSNode_h__)
00011 #define __HDSNode_h__
00012 
00013 #include "../defs.h"
00014 
00015 BEGIN_NAMESPACE_ADS
00016 
00018 
00022 template <class HDS>
00023 class HDSNode
00024 {
00025   //
00026   // Public types.
00027   //
00028 
00029 public:
00030 
00032   typedef typename HDS::Halfedge_handle Halfedge_handle;
00033 
00035   typedef typename HDS::Halfedge_const_handle Halfedge_const_handle;
00036 
00037   //
00038   // Data
00039   //
00040       
00041 private:
00042       
00043   Halfedge_handle _halfedge;
00044 
00045 public:
00046 
00047   //
00048   // Constructors and Destructor
00049   //
00050 
00052   HDSNode()
00053   {}
00054 
00056   HDSNode( Halfedge_handle h ) :
00057     _halfedge( h )
00058   {}
00059 
00061   HDSNode( const HDSNode& x ) :
00062     _halfedge( x._halfedge )
00063   {}
00064 
00066   ~HDSNode()
00067   {}
00068 
00069   //
00070   // Assignment operators.
00071   //
00072       
00074   HDSNode& 
00075   operator=( const HDSNode& x )
00076   {
00077     if ( &x != this ) {
00078       _halfedge = x._halfedge;
00079     }
00080     return *this;
00081   }
00082 
00083   //  
00084   // Accessors
00085   //
00086 
00088   Halfedge_const_handle
00089   halfedge() const
00090   { 
00091     return _halfedge;
00092   }
00093 
00094   //  
00095   // Manipulators
00096   //
00097 
00099   Halfedge_handle&
00100   halfedge()
00101   { 
00102     return _halfedge;
00103   }
00104 
00105 };
00106 
00107 /* REMOVE
00109 template <class HDS>
00110 bool 
00111 operator==( const HDSNode<HDS>& a, const HDSNode<HDS>& b )
00112 {
00113 return ( a.index() == b.index() &&
00114 a.halfedge()->index() == b.halfedge()->index() );
00115 }
00116 
00118 template <class HDS>
00119 bool 
00120 operator!=( const HDSNode<HDS>& a, const HDSNode<HDS>& b )
00121 {
00122   return !(a == b );
00123 }
00124 */
00125 
00126 END_NAMESPACE_ADS
00127 
00128 #endif

Generated on Fri Aug 24 12:55:24 2007 for Algorithms and Data Structures Package by  doxygen 1.4.7