summaryrefslogtreecommitdiff
path: root/include/gras/detail
diff options
context:
space:
mode:
authorJosh Blum2013-07-07 10:09:50 -0700
committerJosh Blum2013-07-07 10:09:50 -0700
commite2a237e121edfb53378ae57d8faa71491d0f29f1 (patch)
tree24ebeef084285617be5e0a90857880c6bf071ff5 /include/gras/detail
parenta8f263d94f8eb772a3a334aa5bb08c6e30b996ec (diff)
downloadsandhi-e2a237e121edfb53378ae57d8faa71491d0f29f1.tar.gz
sandhi-e2a237e121edfb53378ae57d8faa71491d0f29f1.tar.bz2
sandhi-e2a237e121edfb53378ae57d8faa71491d0f29f1.zip
gras: renamed key to name for clarity
Diffstat (limited to 'include/gras/detail')
-rw-r--r--include/gras/detail/callable.hpp64
1 files changed, 32 insertions, 32 deletions
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 <typename ClassType, typename ReturnType>
-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<ClassType *>(this);
void *fr = new CallableRegistryEntryImpl0<ClassType, ReturnType>(obj, fcn);
- _register_call(key, fr);
+ _register_call(name, fr);
}
template <typename ClassType>
@@ -56,11 +56,11 @@ struct CallableRegistryEntryImplVoid0 : CallableRegistryEntry
};
template <typename ClassType>
-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<ClassType *>(this);
void *fr = new CallableRegistryEntryImplVoid0<ClassType>(obj, fcn);
- _register_call(key, fr);
+ _register_call(name, fr);
}
/***********************************************************************
@@ -81,11 +81,11 @@ struct CallableRegistryEntryImpl1 : CallableRegistryEntry
};
template <typename ClassType, typename ReturnType, typename Arg0>
-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<ClassType *>(this);
void *fr = new CallableRegistryEntryImpl1<ClassType, ReturnType, Arg0>(obj, fcn);
- _register_call(key, fr);
+ _register_call(name, fr);
}
template <typename ClassType, typename Arg0>
@@ -103,11 +103,11 @@ struct CallableRegistryEntryImplVoid1 : CallableRegistryEntry
};
template <typename ClassType, typename Arg0>
-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<ClassType *>(this);
void *fr = new CallableRegistryEntryImplVoid1<ClassType, Arg0>(obj, fcn);
- _register_call(key, fr);
+ _register_call(name, fr);
}
/***********************************************************************
@@ -128,11 +128,11 @@ struct CallableRegistryEntryImpl2 : CallableRegistryEntry
};
template <typename ClassType, typename ReturnType, typename Arg0, typename Arg1>
-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<ClassType *>(this);
void *fr = new CallableRegistryEntryImpl2<ClassType, ReturnType, Arg0, Arg1>(obj, fcn);
- _register_call(key, fr);
+ _register_call(name, fr);
}
template <typename ClassType, typename Arg0, typename Arg1>
@@ -150,11 +150,11 @@ struct CallableRegistryEntryImplVoid2 : CallableRegistryEntry
};
template <typename ClassType, typename Arg0, typename Arg1>
-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<ClassType *>(this);
void *fr = new CallableRegistryEntryImplVoid2<ClassType, Arg0, Arg1>(obj, fcn);
- _register_call(key, fr);
+ _register_call(name, fr);
}
/***********************************************************************
@@ -175,11 +175,11 @@ struct CallableRegistryEntryImpl3 : CallableRegistryEntry
};
template <typename ClassType, typename ReturnType, typename Arg0, typename Arg1, typename Arg2>
-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<ClassType *>(this);
void *fr = new CallableRegistryEntryImpl3<ClassType, ReturnType, Arg0, Arg1, Arg2>(obj, fcn);
- _register_call(key, fr);
+ _register_call(name, fr);
}
template <typename ClassType, typename Arg0, typename Arg1, typename Arg2>
@@ -197,95 +197,95 @@ struct CallableRegistryEntryImplVoid3 : CallableRegistryEntry
};
template <typename ClassType, typename Arg0, typename Arg1, typename Arg2>
-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<ClassType *>(this);
void *fr = new CallableRegistryEntryImplVoid3<ClassType, Arg0, Arg1, Arg2>(obj, fcn);
- _register_call(key, fr);
+ _register_call(name, fr);
}
/***********************************************************************
* Call implementations with 0 args
**********************************************************************/
template <typename ReturnType>
-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<ReturnType>();
}
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 <typename ReturnType, typename Arg0>
-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<ReturnType>();
}
template <typename Arg0>
-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 <typename ReturnType, typename Arg0, typename Arg1>
-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<ReturnType>();
}
template <typename Arg0, typename Arg1>
-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 <typename ReturnType, typename Arg0, typename Arg1, typename Arg2>
-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<ReturnType>();
}
template <typename Arg0, typename Arg1, typename Arg2>
-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