00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
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 }
00034 #endif // __MMX_MMXLIGHT_GLUE_HPP