User Guide
nmodl::pybind_wrappers::EmbeddedPythonLoader Class Reference

A singleton class handling access to the pybind_wrap_api struct. More...

Detailed Description

A singleton class handling access to the pybind_wrap_api struct.

This class manages the runtime loading of the libpython so/dylib file and the python binding wrapper library and provides access to the API wrapper struct that can be used to access the pybind11 embedded python functionality.

Definition at line 22 of file pyembed.hpp.

#include <pyembed.hpp>

Public Member Functions

 EmbeddedPythonLoader (const EmbeddedPythonLoader &)=delete
 
void operator= (const EmbeddedPythonLoader &)=delete
 
const pybind_wrap_apiapi ()
 Get a pointer to the pybind_wrap_api struct. More...
 
 ~EmbeddedPythonLoader ()
 

Static Public Member Functions

static EmbeddedPythonLoaderget_instance ()
 Construct (if not already done) and get the only instance of this class. More...
 

Private Member Functions

bool have_wrappers ()
 
void load_libraries ()
 
void populate_symbols ()
 
void unload ()
 
 EmbeddedPythonLoader ()
 

Private Attributes

pybind_wrap_api wrappers
 
void * pylib_handle = nullptr
 
void * pybind_wrapper_handle = nullptr
 

Constructor & Destructor Documentation

◆ EmbeddedPythonLoader() [1/2]

nmodl::pybind_wrappers::EmbeddedPythonLoader::EmbeddedPythonLoader ( const EmbeddedPythonLoader )
delete

◆ ~EmbeddedPythonLoader()

nmodl::pybind_wrappers::EmbeddedPythonLoader::~EmbeddedPythonLoader ( )
inline

Definition at line 47 of file pyembed.hpp.

◆ EmbeddedPythonLoader() [2/2]

nmodl::pybind_wrappers::EmbeddedPythonLoader::EmbeddedPythonLoader ( )
inlineprivate

Definition at line 62 of file pyembed.hpp.

Member Function Documentation

◆ api()

const pybind_wrap_api & nmodl::pybind_wrappers::EmbeddedPythonLoader::api ( )

Get a pointer to the pybind_wrap_api struct.

Get access to the container struct for the pointers to the functions in the wrapper library.

Returns
a pybind_wrap_api pointer

Definition at line 135 of file pyembed.cpp.

◆ get_instance()

static EmbeddedPythonLoader& nmodl::pybind_wrappers::EmbeddedPythonLoader::get_instance ( )
inlinestatic

Construct (if not already done) and get the only instance of this class.

Returns
the EmbeddedPythonLoader singleton instance

Definition at line 29 of file pyembed.hpp.

◆ have_wrappers()

bool nmodl::pybind_wrappers::EmbeddedPythonLoader::have_wrappers ( )
private

Definition at line 29 of file pyembed.cpp.

◆ load_libraries()

void nmodl::pybind_wrappers::EmbeddedPythonLoader::load_libraries ( )
private

Definition at line 66 of file pyembed.cpp.

◆ operator=()

void nmodl::pybind_wrappers::EmbeddedPythonLoader::operator= ( const EmbeddedPythonLoader )
delete

◆ populate_symbols()

void nmodl::pybind_wrappers::EmbeddedPythonLoader::populate_symbols ( )
private

Definition at line 105 of file pyembed.cpp.

◆ unload()

void nmodl::pybind_wrappers::EmbeddedPythonLoader::unload ( )
private

Definition at line 124 of file pyembed.cpp.

Member Data Documentation

◆ pybind_wrapper_handle

void* nmodl::pybind_wrappers::EmbeddedPythonLoader::pybind_wrapper_handle = nullptr
private

Definition at line 55 of file pyembed.hpp.

◆ pylib_handle

void* nmodl::pybind_wrappers::EmbeddedPythonLoader::pylib_handle = nullptr
private

Definition at line 54 of file pyembed.hpp.

◆ wrappers

pybind_wrap_api nmodl::pybind_wrappers::EmbeddedPythonLoader::wrappers
private

Definition at line 52 of file pyembed.hpp.


The documentation for this class was generated from the following files: