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