From e2a237e121edfb53378ae57d8faa71491d0f29f1 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Sun, 7 Jul 2013 10:09:50 -0700 Subject: gras: renamed key to name for clarity --- include/gras/detail/callable.hpp | 64 ++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'include/gras/detail') diff --git a/include/gras/detail/callable.hpp b/include/gras/detail/callable.hpp index ddc8f55..98fa29d 100644 --- a/include/gras/detail/callable.hpp +++ b/include/gras/detail/callable.hpp @@ -35,11 +35,11 @@ struct CallableRegistryEntryImpl0 : CallableRegistryEntry }; template -void Callable::register_call(const std::string &key, ReturnType(ClassType::*fcn)(void)) +void Callable::register_call(const std::string &name, ReturnType(ClassType::*fcn)(void)) { ClassType *obj = dynamic_cast(this); void *fr = new CallableRegistryEntryImpl0(obj, fcn); - _register_call(key, fr); + _register_call(name, fr); } template @@ -56,11 +56,11 @@ struct CallableRegistryEntryImplVoid0 : CallableRegistryEntry }; template -void Callable::register_call(const std::string &key, void(ClassType::*fcn)(void)) +void Callable::register_call(const std::string &name, void(ClassType::*fcn)(void)) { ClassType *obj = dynamic_cast(this); void *fr = new CallableRegistryEntryImplVoid0(obj, fcn); - _register_call(key, fr); + _register_call(name, fr); } /*********************************************************************** @@ -81,11 +81,11 @@ struct CallableRegistryEntryImpl1 : CallableRegistryEntry }; template -void Callable::register_call(const std::string &key, ReturnType(ClassType::*fcn)(const Arg0 &)) +void Callable::register_call(const std::string &name, ReturnType(ClassType::*fcn)(const Arg0 &)) { ClassType *obj = dynamic_cast(this); void *fr = new CallableRegistryEntryImpl1(obj, fcn); - _register_call(key, fr); + _register_call(name, fr); } template @@ -103,11 +103,11 @@ struct CallableRegistryEntryImplVoid1 : CallableRegistryEntry }; template -void Callable::register_call(const std::string &key, void(ClassType::*fcn)(const Arg0 &)) +void Callable::register_call(const std::string &name, void(ClassType::*fcn)(const Arg0 &)) { ClassType *obj = dynamic_cast(this); void *fr = new CallableRegistryEntryImplVoid1(obj, fcn); - _register_call(key, fr); + _register_call(name, fr); } /*********************************************************************** @@ -128,11 +128,11 @@ struct CallableRegistryEntryImpl2 : CallableRegistryEntry }; template -void Callable::register_call(const std::string &key, ReturnType(ClassType::*fcn)(const Arg0 &, const Arg1 &)) +void Callable::register_call(const std::string &name, ReturnType(ClassType::*fcn)(const Arg0 &, const Arg1 &)) { ClassType *obj = dynamic_cast(this); void *fr = new CallableRegistryEntryImpl2(obj, fcn); - _register_call(key, fr); + _register_call(name, fr); } template @@ -150,11 +150,11 @@ struct CallableRegistryEntryImplVoid2 : CallableRegistryEntry }; template -void Callable::register_call(const std::string &key, void(ClassType::*fcn)(const Arg0 &, const Arg1 &)) +void Callable::register_call(const std::string &name, void(ClassType::*fcn)(const Arg0 &, const Arg1 &)) { ClassType *obj = dynamic_cast(this); void *fr = new CallableRegistryEntryImplVoid2(obj, fcn); - _register_call(key, fr); + _register_call(name, fr); } /*********************************************************************** @@ -175,11 +175,11 @@ struct CallableRegistryEntryImpl3 : CallableRegistryEntry }; template -void Callable::register_call(const std::string &key, ReturnType(ClassType::*fcn)(const Arg0 &, const Arg1 &, const Arg2 &)) +void Callable::register_call(const std::string &name, ReturnType(ClassType::*fcn)(const Arg0 &, const Arg1 &, const Arg2 &)) { ClassType *obj = dynamic_cast(this); void *fr = new CallableRegistryEntryImpl3(obj, fcn); - _register_call(key, fr); + _register_call(name, fr); } template @@ -197,95 +197,95 @@ struct CallableRegistryEntryImplVoid3 : CallableRegistryEntry }; template -void Callable::register_call(const std::string &key, void(ClassType::*fcn)(const Arg0 &, const Arg1 &, const Arg2 &)) +void Callable::register_call(const std::string &name, void(ClassType::*fcn)(const Arg0 &, const Arg1 &, const Arg2 &)) { ClassType *obj = dynamic_cast(this); void *fr = new CallableRegistryEntryImplVoid3(obj, fcn); - _register_call(key, fr); + _register_call(name, fr); } /*********************************************************************** * Call implementations with 0 args **********************************************************************/ template -ReturnType Callable::x(const std::string &key) +ReturnType Callable::x(const std::string &name) { PMCList args(0); - PMCC r = _handle_call(key, PMC_M(args)); + PMCC r = _handle_call(name, PMC_M(args)); return r.safe_as(); } inline -void Callable::x(const std::string &key) +void Callable::x(const std::string &name) { PMCList args(0); - _handle_call(key, PMC_M(args)); + _handle_call(name, PMC_M(args)); } /*********************************************************************** * Call implementations with 1 args **********************************************************************/ template -ReturnType Callable::x(const std::string &key, const Arg0 &a0) +ReturnType Callable::x(const std::string &name, const Arg0 &a0) { PMCList args(1); args[0] = PMC_M(a0); - PMCC r = _handle_call(key, PMC_M(args)); + PMCC r = _handle_call(name, PMC_M(args)); return r.safe_as(); } template -void Callable::x(const std::string &key, const Arg0 &a0) +void Callable::x(const std::string &name, const Arg0 &a0) { PMCList args(1); args[0] = PMC_M(a0); - _handle_call(key, PMC_M(args)); + _handle_call(name, PMC_M(args)); } /*********************************************************************** * Call implementations with 2 args **********************************************************************/ template -ReturnType Callable::x(const std::string &key, const Arg0 &a0, const Arg1 &a1) +ReturnType Callable::x(const std::string &name, const Arg0 &a0, const Arg1 &a1) { PMCList args(2); args[0] = PMC_M(a0); args[1] = PMC_M(a1); - PMCC r = _handle_call(key, PMC_M(args)); + PMCC r = _handle_call(name, PMC_M(args)); return r.safe_as(); } template -void Callable::x(const std::string &key, const Arg0 &a0, const Arg1 &a1) +void Callable::x(const std::string &name, const Arg0 &a0, const Arg1 &a1) { PMCList args(2); args[0] = PMC_M(a0); args[1] = PMC_M(a1); - _handle_call(key, PMC_M(args)); + _handle_call(name, PMC_M(args)); } /*********************************************************************** * Call implementations with 3 args **********************************************************************/ template -ReturnType Callable::x(const std::string &key, const Arg0 &a0, const Arg1 &a1, const Arg2 &a2) +ReturnType Callable::x(const std::string &name, const Arg0 &a0, const Arg1 &a1, const Arg2 &a2) { PMCList args(3); args[0] = PMC_M(a0); args[1] = PMC_M(a1); args[2] = PMC_M(a2); - PMCC r = _handle_call(key, PMC_M(args)); + PMCC r = _handle_call(name, PMC_M(args)); return r.safe_as(); } template -void Callable::x(const std::string &key, const Arg0 &a0, const Arg1 &a1, const Arg2 &a2) +void Callable::x(const std::string &name, const Arg0 &a0, const Arg1 &a1, const Arg2 &a2) { PMCList args(3); args[0] = PMC_M(a0); args[1] = PMC_M(a1); args[2] = PMC_M(a2); - _handle_call(key, PMC_M(args)); + _handle_call(name, PMC_M(args)); } } //namespace gras -- cgit