410{
411
413
414
415
416 py::implicitly_convertible<std::shared_ptr<ModuleWrap<Module>>,
417 std::shared_ptr<Module>>();
418 py::implicitly_convertible<std::shared_ptr<ModuleWrap<InputModule>>,
419 std::shared_ptr<Module>>();
420 py::implicitly_convertible<std::shared_ptr<ModuleWrap<OutputModule>>,
421 std::shared_ptr<Module>>();
422 py::implicitly_convertible<std::shared_ptr<ModuleWrap<ProcessModule>>,
423 std::shared_ptr<Module>>();
424
425
426
427
428
429
430 py::class_<ModuleWrap<Module>, std::shared_ptr<ModuleWrap<Module>>,
431 boost::noncopyable>("Module", py::init<FieldSharedPtr>())
432
433
436
437
439 (py::arg("key"), py::arg("value") = ""))
440 .def("PrintConfig", &Module::PrintConfig)
441 .def("SetDefaults", &Module::SetDefaults)
442 .def("GetStringConfig", Module_GetConfig<std::string>)
443 .def("GetFloatConfig", Module_GetConfig<double>)
444 .def("GetIntConfig", Module_GetConfig<int>)
445 .def("GetBoolConfig", Module_GetConfig<bool>)
446 .def("AddConfigOption", ModuleWrap_AddConfigOption<Module>,
447 (py::arg("key"), py::arg("defValue"), py::arg("desc"),
448 py::arg("isBool") = false))
449
450
452
453
455 .staticmethod("Register");
456
458
462}
#define NEKPY_WRAP_ENUM_STRING(ENUMNAME, MAPNAME)
void Module_RegisterConfig(std::shared_ptr< Module > mod, std::string const &key, std::string const &value)
Lightweight wrapper for FieldUtils::Module::RegisterConfig.
void Module_Process(ModuleSharedPtr m)
void Module_Register(ModuleType const &modType, std::string const &modName, py::object &obj)
Lightweight wrapper for the Module factory RegisterCreatorFunction, to support the ability for Python...
const std::string ModuleTypeMap[]
Module wrapper to handle virtual function calls in Module and its subclasses as defined by the templa...