predecls.hh

00001 // Copyright (C) 2001, 2002, 2003, 2004 EPITA Research and Development
00002 // Laboratory
00003 //
00004 // This file is part of the Olena Library.  This library is free
00005 // software; you can redistribute it and/or modify it under the terms
00006 // of the GNU General Public License version 2 as published by the
00007 // Free Software Foundation.
00008 //
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with this library; see the file COPYING.  If not, write to
00016 // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017 // Boston, MA 02110-1301, USA.
00018 //
00019 // As a special exception, you may use this file as part of a free
00020 // software library without restriction.  Specifically, if other files
00021 // instantiate templates or use macros or inline functions from this
00022 // file, or you compile this file and link it with other files to
00023 // produce an executable, this file does not by itself cause the
00024 // resulting executable to be covered by the GNU General Public
00025 // License.  This exception does not however invalidate any other
00026 // reasons why the executable file might be covered by the GNU General
00027 // Public License.
00028 
00029 #ifndef NTG_CORE_PREDECLS_HH
00030 # define NTG_CORE_PREDECLS_HH
00031 
00032 # include <mlc/type.hh>
00033 
00034 # include <ntg/vect/cplx_representation.hh>
00035 
00036 /*
00037   Forward declarations of every available types.
00038 */
00039 
00040 namespace ntg
00041 {
00042 
00043   /*----------.
00044   | behaviors |
00045   `----------*/
00046 
00047   class unsafe;
00048   class strict;
00049   class saturate;
00050 
00051   /*----------.
00052   | intervals |
00053   `----------*/
00054 
00055   template <class T, T i_min, T i_max> class            bounded;
00056   template <unsigned i_min, unsigned i_max> class       bounded_u;
00057   template <signed i_min, signed i_max> class           bounded_s;
00058 
00059   /*------.
00060   | reals |
00061   `------*/
00062 
00063   template <unsigned nbits, class behavior = strict>            class int_u;
00064   template <unsigned nbits, class behavior = strict>            class int_s;
00065   template <class T, class interval, class behavior = strict>   class range;
00066   template <class T, class interval>                            class cycle;
00067 
00068   typedef float         float_s;
00069   typedef double        float_d;
00070 
00071   /*-----------.
00072   | enumerated |
00073   `-----------*/
00074 
00075   class bin;
00076 
00077   /*----------.
00078   | vectorial |
00079   `----------*/
00080 
00081   template <unsigned N, class T, class Self = mlc::final> class vec;
00082 
00083   template <cplx_representation R, class T> class cplx;
00084 
00085   /*-------.
00086   | colors |
00087   `-------*/
00088 
00089   // This helps swig to parse to file.
00090 #ifndef SWIG
00091     template <unsigned ncomps, 
00092               unsigned qbits, 
00093               template <unsigned> class color_system>
00094     struct color;
00095 #else
00096     struct color;
00097 #endif
00098   
00099   template<int lval, int uval>
00100   struct interval;
00101   
00102   /*--------------------.
00103   | shortcuts for int_u |
00104   `--------------------*/
00105 
00106   typedef int_u<8, strict>      int_u8;
00107   typedef int_u<8, unsafe>      int_u8u;
00108   typedef int_u<8, saturate>    int_u8s;
00109 
00110   typedef int_u<16, strict>     int_u16;
00111   typedef int_u<16, unsafe>     int_u16u;
00112   typedef int_u<16, saturate>   int_u16s;
00113 
00114   typedef int_u<32, strict>     int_u32;
00115   typedef int_u<32, unsafe>     int_u32u;
00116   typedef int_u<32, saturate>   int_u32s;
00117 
00118   /*--------------------.
00119   | shortcuts for int_s |
00120   `--------------------*/
00121 
00122   typedef int_s<8, strict>      int_s8;
00123   typedef int_s<8, unsafe>      int_s8u;
00124   typedef int_s<8, saturate>    int_s8s;
00125 
00126   typedef int_s<16, strict>     int_s16;
00127   typedef int_s<16, unsafe>     int_s16u;
00128   typedef int_s<16, saturate>   int_s16s;
00129 
00130   typedef int_s<32, strict>     int_s32;
00131   typedef int_s<32, unsafe>     int_s32u;
00132   typedef int_s<32, saturate>   int_s32s;
00133 
00134 } // end of ntg.
00135 
00136 #endif // !NTG_CORE_PREDECLS_HH

Generated on Tue Feb 20 20:20:19 2007 for Olena by  doxygen 1.5.1