• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List

solve.hh

00001 // Copyright (C) 2006, 2008, 2009 EPITA Research and Development Laboratory (LRDE)
00002 //
00003 // This file is part of Olena.
00004 //
00005 // Olena is free software: you can redistribute it and/or modify it under
00006 // the terms of the GNU General Public License as published by the Free
00007 // Software Foundation, version 2 of the License.
00008 //
00009 // Olena 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 Olena.  If not, see <http://www.gnu.org/licenses/>.
00016 //
00017 // As a special exception, you may use this file as part of a free
00018 // software project without restriction.  Specifically, if other files
00019 // instantiate templates or use macros or inline functions from this
00020 // file, or you compile this file and link it with other files to produce
00021 // an executable, this file does not by itself cause the resulting
00022 // executable to be covered by the GNU General Public License.  This
00023 // exception does not however invalidate any other reasons why the
00024 // executable file might be covered by the GNU General Public License.
00025 
00026 #ifndef MLN_TRAIT_NEXT_SOLVE_HH
00027 # define MLN_TRAIT_NEXT_SOLVE_HH
00028 
00032  
00033 # include <mln/core/category.hh>
00034 # include <mln/metal/equal.hh>
00035 # include <mln/metal/if.hh>
00036 # include <mln/metal/ret.hh>
00037 # include <mln/trait/solve.hh>
00038 
00039 
00040 // FIXME: Just for the record (use it...)
00041 
00042 #  ifndef MLN_DEBUG_TRAITS
00043 #  endif // ! MLN_DEBUG_TRAITS
00044 
00045 
00046 # define mln_trait_nunary(Name, T)  typename mln::trait::next::solve_unary< Name, T >::ret
00047 # define mln_trait_nunary_(Name, T)          mln::trait::next::solve_unary< Name, T >::ret
00048 
00049 # define mln_trait_nbinary(Name, T1, T2)  typename mln::trait::next::solve_binary< Name, T1, T2 >::ret
00050 # define mln_trait_nbinary_(Name, T1, T2)          mln::trait::next::solve_binary< Name, T1, T2 >::ret
00051 
00052 
00053 
00054 namespace mln
00055 {
00056 
00057   namespace trait
00058   {
00059 
00060     namespace next
00061     {
00062 
00063       // Unary case.
00064 
00065 
00066       template < typename Name,
00067                  typename T >
00068       struct set_precise_unary_
00069       {
00070         typedef undefined ret;
00071       };
00072 
00073 
00074       template < typename Name,
00075                  template <class> class Category_T, typename T >
00076       struct set_unary_
00077       {
00078         typedef undefined ret;
00079       };
00080 
00081       template < typename Name,
00082                  typename T >
00083       struct set_unary_< Name, Unknown, T > // Blocker; top of inheritance.
00084       {
00085         typedef not_found ret;
00086       };
00087 
00088 
00089 
00090 
00091       // Binary case.
00092 
00093 
00094       template < typename Name,
00095                  typename L,
00096                  typename R >
00097       struct set_precise_binary_
00098       {
00099         typedef undefined ret;
00100       };
00101 
00102 
00103       template < typename Name,
00104                  template <class> class Category_L, typename L,
00105                  template <class> class Category_R, typename R >
00106       struct set_binary_
00107       {
00108         typedef undefined ret;
00109       };
00110 
00111       template < typename Name,
00112                  typename L,
00113                  template <class> class Category_R, typename R >
00114       struct set_binary_< Name, Unknown, L, Category_R, R > // Left blocker.
00115       {
00116         typedef not_found ret;
00117       };
00118 
00119       template < typename Name,
00120                  template <class> class Category_L, typename L,
00121                  typename R >
00122       struct set_binary_< Name, Category_L, L, Unknown, R > // Right blocker.
00123       {
00124         typedef not_found ret;
00125       };
00126 
00127       template < typename Name,
00128                  typename L,
00129                  typename R >
00130       struct set_binary_< Name, Unknown, L, Unknown, R > // Blocker.
00131       {
00132         typedef not_found ret;
00133       };
00134 
00135     } // end of namespace mln::trait::next
00136 
00137   } // end of namespace mln::trait
00138 
00139 } // end of namespace mln
00140 
00141 
00142 # include <mln/trait/next/solve_unary.hh>
00143 # include <mln/trait/next/solve_binary.hh>
00144 # include <mln/trait/next/solve_proxy.hh>
00145 
00146 #endif // ! MLN_TRAIT_NEXT_SOLVE_HH

Generated on Tue Oct 4 2011 15:24:28 for Milena (Olena) by  doxygen 1.7.1