BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Arr_geometry_traits/Curve_data_aux.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/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Curve_data_aux.h $
00015 // $Id: Curve_data_aux.h 40377 2007-09-19 11:05:08Z ophirset $
00016 // 
00017 //
00018 // Author(s)     : Ron Wein          <wein@post.tau.ac.il>
00019 //                 Efi Fogel         <efif@post.tau.ac.il>
00020 
00021 #ifndef CGAL_CURVE_DATA_AUX_H
00022 #define CGAL_CURVE_DATA_AUX_H
00023 
00028 CGAL_BEGIN_NAMESPACE
00029 
00033 template <class TYPE>
00034 struct _Default_merge_func
00035 {
00036   const TYPE& operator() (const TYPE& obj1, const TYPE& /* obj2 */)
00037   {
00038     return (obj1);
00039   }
00040 };
00041 
00045 template <class TYPE_FROM, class TYPE_TO>
00046 struct _Default_convert_func
00047 {
00048   TYPE_TO operator() (const TYPE_FROM& obj)
00049   {
00050     return (obj);
00051   }
00052 };
00053 
00057 template <class BaseCurveType, class Data>
00058 class _Curve_data_ex : public BaseCurveType
00059 {
00060 private:
00061   Data    m_data;
00062 
00063 public:
00064 
00066   _Curve_data_ex ()
00067   {}
00068     
00073   _Curve_data_ex (const BaseCurveType& cv) :
00074     BaseCurveType (cv)
00075   {}
00076 
00082   _Curve_data_ex (const BaseCurveType& cv, const Data& data) :
00083     BaseCurveType (cv),
00084     m_data (data)
00085   {}
00086 
00091   const Data& data () const
00092   {
00093     return (m_data);
00094   }
00095 
00100   Data& data ()
00101   {
00102     return (m_data);
00103   }
00104 
00109   void set_data (const Data& data)
00110   {
00111     m_data = data;
00112     return;
00113   }
00114 };
00115 
00116 CGAL_END_NAMESPACE
00117 
00118 #endif
00119 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines