Cleanup Cast_Helper and add new boxed_cast<>() function.

This commit is contained in:
Jason Turner
2009-06-23 02:47:47 +00:00
parent a5ecd3ceb0
commit d02620bb1b
9 changed files with 55 additions and 47 deletions

View File

@@ -28,7 +28,7 @@ namespace dispatchkit
Ret call(const std::vector<std::pair<std::string, boost::shared_ptr<Proxy_Function> > > &t_funcs,
const std::vector<Boxed_Value> &params)
{
return Cast_Helper<Ret>()(dispatch(t_funcs, params));
return boxed_cast<Ret>(dispatch(t_funcs, params));
}
};
@@ -66,7 +66,7 @@ namespace dispatchkit
template<typename FunctionType, typename ScriptEngine>
boost::function<FunctionType> build_functor(ScriptEngine &e, const std::string &script)
{
return build_function_caller<FunctionType>(Cast_Helper<boost::shared_ptr<Proxy_Function> >()(e.evaluate_string(script)));
return build_function_caller<FunctionType>(boxed_cast<boost::shared_ptr<Proxy_Function> >(e.evaluate_string(script)));
}
}