diff --git a/boxedcpp/test.cpp b/boxedcpp/test.cpp index 2e8fe4e..d37d9af 100644 --- a/boxedcpp/test.cpp +++ b/boxedcpp/test.cpp @@ -79,6 +79,10 @@ Boxed_Value dynamic_function(BoxedCPP_System &ss, const std::string &name, } } +void test(const std::string &p) +{ + std::cout << "Test: " << p << std::endl; +} //Test main int main() @@ -173,7 +177,11 @@ int main() std::cout << "Result of add function: " << Cast_Helper()(dispatch(ss.get_function("add"), Param_List_Builder() << 5 << 2)) << std::endl; - + + + ss.set_object("myfunc", boost::shared_ptr(new Proxy_Function_Impl >(&test))); + + dispatch(ss.get_function("myfunc"), Param_List_Builder() << std::string("hello function variable")); }