BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Boolean_set_operations_2/Gps_default_dcel.h
Go to the documentation of this file.
00001 // Copyright (c) 2005  Tel-Aviv University (Israel).
00002 // All rights reserved.
00003 //
00004 // This file is part of CGAL (www.cgal.org); you may redistribute it under
00005 // the terms of the Q Public License version 1.0.
00006 // See the file LICENSE.QPL distributed with CGAL.
00007 //
00008 // Licensees holding a valid commercial license may use this file in
00009 // accordance with the commercial license agreement provided with the software.
00010 //
00011 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00012 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00013 //
00014 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_default_dcel.h $
00015 // $Id: Gps_default_dcel.h 35719 2007-01-14 14:42:35Z efif $
00016 // 
00017 //
00018 // Author(s)     : Baruch Zukerman <baruchzu@post.tau.ac.il>
00019 //                 Efi Fogel <efif@post.tau.ac.il>
00020 
00021 #ifndef CGAL_GPS_DEFAULT_DCEL_H
00022 #define CGAL_GPS_DEFAULT_DCEL_H
00023 
00030 #include <CGAL/Arr_default_dcel.h>
00031 
00032 CGAL_BEGIN_NAMESPACE
00033 
00034 class Gps_face_base : public Arr_face_base
00035 {
00036 protected:
00037   mutable char m_info;
00038   
00039   enum
00040   {
00041     CONTAINED = 1,
00042     VISITED   = 2
00043   };
00044 
00045 
00046 public:
00047   //Constructor
00048   Gps_face_base() :
00049     Arr_face_base(),
00050     m_info(0)
00051   {}
00052 
00054   virtual void assign (const Arr_face_base& f)
00055   {
00056     Arr_face_base::assign (f);
00057 
00058     const Gps_face_base & ex_f = static_cast<const Gps_face_base&>(f);
00059     m_info = ex_f.m_info;
00060   }
00061   
00062   bool contained() const
00063   {
00064     return (m_info & CONTAINED) != 0;
00065   }
00066 
00067   void set_contained(bool b)
00068   {
00069     if (b)
00070       m_info |= CONTAINED;
00071     else
00072       m_info &= ~CONTAINED;
00073   }
00074 
00075   bool visited() const
00076   {
00077     return (m_info & VISITED) != 0;
00078   }
00079 
00080   void set_visited(bool b) const
00081   {
00082     if (b)
00083       m_info |= VISITED;
00084     else
00085       m_info &= ~VISITED;
00086   }
00087 
00088 };
00089 
00090 
00091 template <class Traits_>
00092 class Gps_default_dcel :
00093   public Arr_dcel_base<Arr_vertex_base<typename Traits_::Point_2>,
00094                        Arr_halfedge_base<typename Traits_::X_monotone_curve_2>,
00095                        Gps_face_base>
00096 {
00097 public:
00099   Gps_default_dcel() {}
00100 };
00101 
00102 
00103 
00104 CGAL_END_NAMESPACE
00105 
00106 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines