BWAPI
SPAR/AIModule/BWTA/vendors/CGAL/CGAL/Gmp_coercion_traits.h
Go to the documentation of this file.
00001 // Copyright (c) 2006-2008 Max-Planck-Institute Saarbruecken (Germany).
00002 // All rights reserved.
00003 //
00004 // This file is part of CGAL (www.cgal.org); you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public License as
00006 // published by the Free Software Foundation; version 2.1 of the License.
00007 // See the file LICENSE.LGPL distributed with CGAL.
00008 //
00009 // Licensees holding a valid commercial license may use this file in
00010 // accordance with the commercial license agreement provided with the software.
00011 //
00012 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00013 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00014 //
00015 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/Number_types/include/CGAL/Gmp_coercion_traits.h $
00016 // $Id: Gmp_coercion_traits.h 47264 2008-12-08 06:25:14Z hemmer $
00017 //
00018 //
00019 // Author(s)     : Michael Hemmer   <hemmer@mpi-inf.mpg.de>
00020 
00021 
00026 #ifndef CGAL_GMP_COERCION_TRAITS_H
00027 #define CGAL_GMP_COERCION_TRAITS_H 1
00028 
00029 #include <CGAL/number_type_basic.h>
00030 #include <CGAL/GMP/Gmpz_type.h>
00031 #include <CGAL/GMP/Gmpzf_type.h>
00032 #include <CGAL/GMP/Gmpq_type.h>
00033 #include <CGAL/Coercion_traits.h>
00034 
00035 #ifdef CGAL_USE_GMP
00036 
00037 CGAL_BEGIN_NAMESPACE
00038 
00039 //Gmp internal coercions:
00040 CGAL_DEFINE_COERCION_TRAITS_FOR_SELF(Gmpz)
00041 CGAL_DEFINE_COERCION_TRAITS_FOR_SELF(Gmpzf)
00042 CGAL_DEFINE_COERCION_TRAITS_FOR_SELF(Gmpq)
00043 CGAL_DEFINE_COERCION_TRAITS_FROM_TO(Gmpz,Gmpzf)
00044 //CGAL_DEFINE_COERCION_TRAITS_FROM_TO(Gmpzf,Gmpzq); // todo
00045 CGAL_DEFINE_COERCION_TRAITS_FROM_TO(Gmpz,Gmpq)
00046 
00047 // The following definitions reflect the interaction of the Gmp number types
00048 // with the built in types,
00049 // Gmpz:
00050     CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short    ,Gmpz)
00051     CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int      ,Gmpz)
00052     CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long     ,Gmpz)
00053 
00054 // Gmpzf: not tested
00055     CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short    ,Gmpzf)
00056     CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int      ,Gmpzf)
00057     CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long     ,Gmpzf)
00058     CGAL_DEFINE_COERCION_TRAITS_FROM_TO(float    ,Gmpzf)
00059     CGAL_DEFINE_COERCION_TRAITS_FROM_TO(double   ,Gmpzf)
00060 
00061 // Gmpq:
00062     CGAL_DEFINE_COERCION_TRAITS_FROM_TO(short      ,Gmpq)
00063     CGAL_DEFINE_COERCION_TRAITS_FROM_TO(int        ,Gmpq)
00064     CGAL_DEFINE_COERCION_TRAITS_FROM_TO(long       ,Gmpq)
00065     CGAL_DEFINE_COERCION_TRAITS_FROM_TO(float      ,Gmpq)
00066     CGAL_DEFINE_COERCION_TRAITS_FROM_TO(double     ,Gmpq)
00067 
00068 CGAL_END_NAMESPACE
00069 
00070 
00071 #endif // CGAL_USE_GMP
00072 #endif //CGAL_GMP_COERCION_TRAITS_H 1
00073 //EOF
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines