basix_doc 0.1
/Users/mourrain/Devel/mmx/basix/glue/glue_dynamic.cpp
Go to the documentation of this file.
00001 
00002 #include <basix/dynamic.hpp>
00003 #include <basix/routine.hpp>
00004 #include <basix/tuple.hpp>
00005 #include <basix/glue.hpp>
00006 
00007 namespace mmx {
00008   static dynamic
00009   GLUE_1 (const generic &arg_1) {
00010     return dynamic (arg_1);
00011   }
00012   
00013   static generic
00014   GLUE_2 (const dynamic &arg_1) {
00015     return contents (arg_1);
00016   }
00017   
00018   static dynamic
00019   GLUE_3 (const routine &arg_1, const tuple<dynamic> &arg_2) {
00020     return dynamic (arg_1, as_vector (arg_2));
00021   }
00022   
00023   static void
00024   GLUE_4 (const dynamic &arg_1, const generic &arg_2) {
00025     assign (arg_1, arg_2);
00026   }
00027   
00028   void
00029   glue_dynamic () {
00030     static bool done = false;
00031     if (done) return;
00032     done = true;
00033     define_type<dynamic > (lit ("Dynamic"));
00034     define ("dynamic", GLUE_1);
00035     define ("contents", GLUE_2);
00036     define ("apply", GLUE_3);
00037     define ("assign", GLUE_4);
00038   }
00039 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines