• Main Page
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

/Users/magix/mmx/mmxlight/include/mmxlight/mmxlight_glue.hpp

Go to the documentation of this file.
00001 
00002 /******************************************************************************
00003 * MODULE     : mmxlight_glue.hpp
00004 * DESCRIPTION: Prototypes for some of the functions exported by the glue
00005 * COPYRIGHT  : (C) 2007  Joris van der Hoeven
00006 *******************************************************************************
00007 * This software falls under the GNU general public license and comes WITHOUT
00008 * ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details.
00009 * If you don't have this file, write to the Free Software Foundation, Inc.,
00010 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00011 ******************************************************************************/
00012 
00013 #ifndef __MMX_MMXLIGHT_GLUE_HPP
00014 #define __MMX_MMXLIGHT_GLUE_HPP
00015 #include <basix/glue.hpp>
00016 #include <basix/literal.hpp>
00017 #include <basix/compound.hpp>
00018 namespace mmx {
00019 
00020 generic convert_to (const generic& r, nat t_id, const generic& where);
00021 generic mmx_define (const generic& x);
00022 void    mmx_set (const generic& var, const generic& val);
00023 void    mmx_overload (const generic& var, const generic& val);
00024 
00025 template<typename C> generic
00026 eval_as (const generic& g) {
00027   generic r= eval (g);
00028   if (is<C> (r) || is<exception> (r)) return r;
00029   nat t_id= type_id<C> ();
00030   return convert_to (r, t_id, g);
00031 }
00032 
00033 } // namespace mmx
00034 #endif // __MMX_MMXLIGHT_GLUE_HPP

Generated on Mon May 2 2011 17:04:34 for mmxlight:doc by  doxygen 1.7.2