| 51 | /// |
| 52 | template<typename Class, typename ModuleType> |
| 53 | void add_class(ModuleType &t_module, |
| 54 | const std::string &t_class_name, |
| 55 | const std::vector<chaiscript::Proxy_Function> &t_constructors, |
| 56 | const std::vector<std::pair<chaiscript::Proxy_Function, std::string>> &t_funcs) |
| 57 | { |
| 58 | t_module.add(chaiscript::user_type<Class>(), t_class_name); |
| 59 | |
| 60 | for(const chaiscript::Proxy_Function &ctor: t_constructors) |
| 61 | { |
| 62 | t_module.add(ctor, t_class_name); |
| 63 | } |
| 64 | |
| 65 | for(const auto &fun: t_funcs) |
| 66 | { |
| 67 | t_module.add(fun.first, fun.second); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | template<typename Enum, typename ModuleType> |
| 72 | typename std::enable_if<std::is_enum<Enum>::value, void>::type |
nothing calls this directly
no test coverage detected