#include <pythonscriptservice.h>
Public Member Functions | |
PythonScriptService (ServiceConfiguration *configuration) | |
void | registerObjectCreators (rtti::Factory &factory) override |
bool | TryLoad (const std::string &modulePath, pybind11::module &module, utility::ErrorState &errorState) |
![]() | |
UNPREFIXED_MODULE_NAME_INPUTCASE | Service (ServiceConfiguration *configuration) |
virtual void | getDependentServices (std::vector< rtti::TypeInfo > &dependencies) override |
virtual bool | init (nap::utility::ErrorState &errorState) override |
virtual void | update (double deltaTime) override |
virtual void | shutdown () override |
Service (ServiceConfiguration *configuration) | |
virtual | ~Service () |
Core & | getCore () |
const Core & | getCore () const |
std::string | getTypeName () const |
const Module & | getModule () const |
Service (Service &)=delete | |
Service & | operator= (const Service &)=delete |
Service (Service &&)=delete | |
Service & | operator= (Service &&)=delete |
Additional Inherited Members | |
![]() | |
virtual void | getDependentServices (std::vector< rtti::TypeInfo > &dependencies) |
virtual void | created () |
virtual bool | init (utility::ErrorState &error) |
virtual void | preUpdate (double deltaTime) |
virtual void | update (double deltaTime) |
virtual void | postUpdate (double deltaTime) |
virtual void | preShutdown () |
virtual void | shutdown () |
virtual void | preResourcesLoaded () |
virtual void | postResourcesLoaded () |
template<typename SERVICE_CONFIG > | |
SERVICE_CONFIG * | getConfiguration () |
template<typename SERVICE_CONFIG > | |
const SERVICE_CONFIG * | getConfiguration () const |
std::string | getIniFilePath () const |
std::string | getIniFilePath (const std::string &appendix) const |
Python script services. Manages the python module and environment.
PythonScriptService | ( | ServiceConfiguration * | configuration | ) |
|
overridevirtual |
Called by core. Registers all object creation methods for python specific NAP objects.
factory | the factory to register the creation functions with. |
Reimplemented from Service.
bool TryLoad | ( | const std::string & | modulePath, |
pybind11::module & | module, | ||
utility::ErrorState & | errorState | ||
) |
Tries to load a python module into the NAP environment.
modulePath | path to the python module to load |
module | the loaded module |
errorState | contains the error when loading failed. |