00001 00002 #include <basix/double.hpp> 00003 #include <basix/int.hpp> 00004 #include <basix/vector.hpp> 00005 #include <basix/port.hpp> 00006 #include <basix/literal.hpp> 00007 #include <numerix/integer.hpp> 00008 #include <numerix/modular.hpp> 00009 #include <numerix/modular_integer.hpp> 00010 #include <numerix/rational.hpp> 00011 #include <numerix/floating.hpp> 00012 #include <shape/axel_glue.hpp> 00013 #include <shape/bounding_box_glue.hpp> 00014 #include <basix/tuple.hpp> 00015 #include <basix/alias.hpp> 00016 #include <basix/glue.hpp> 00017 00018 #define double_literal(x) as_double (as_string (x)) 00019 #define int_literal(x) as_int (as_string (x)) 00020 #define is_generic_literal is<literal> 00021 #define gen_literal_apply(f,v) gen (as<generic> (f), v) 00022 #define gen_literal_access(f,v) access (as<generic> (f), v) 00023 00024 namespace mmx { 00025 static shape_axel 00026 GLUE_1 () { 00027 return shape_axel (); 00028 } 00029 00030 static shape_axel 00031 GLUE_2 (const string &arg_1) { 00032 return shape_axel_string (arg_1); 00033 } 00034 00035 static void 00036 GLUE_3 (const shape_axel &arg_1) { 00037 shape_axel_view (arg_1); 00038 } 00039 00040 static shape_bounding_box 00041 GLUE_4 () { 00042 return shape_bounding_box (); 00043 } 00044 00045 static shape_bounding_box 00046 GLUE_5 (const tuple<double> &arg_1) { 00047 return shape_bounding_box_from_vector (as_vector (arg_1)); 00048 } 00049 00050 static shape_bounding_box 00051 GLUE_6 (const tuple<mmx_floating> &arg_1) { 00052 return shape_bounding_box_from_vector (as_vector (arg_1)); 00053 } 00054 00055 static alias<shape_axel> 00056 GLUE_7 (const alias<shape_axel> &arg_1, const shape_bounding_box &arg_2) { 00057 return alias_write (arg_1, arg_2); 00058 } 00059 00060 void 00061 glue_bounding_box () { 00062 static bool done = false; 00063 if (done) return; 00064 done = true; 00065 call_glue (string ("glue_double")); 00066 call_glue (string ("glue_floating")); 00067 define_type<shape_axel > (lit ("Axel")); 00068 define ("axel", GLUE_1); 00069 define ("axel", GLUE_2); 00070 define ("view", GLUE_3); 00071 define_type<shape_bounding_box > (lit ("BoundingBox")); 00072 define ("bounding_box", GLUE_4); 00073 define ("bounding_box", GLUE_5); 00074 define ("bounding_box", GLUE_6); 00075 define ("<<", GLUE_7); 00076 } 00077 }