predecls.hh

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

Generated on Thu Apr 15 20:13:14 2004 for Olena by doxygen 1.3.6-20040222