OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::anonymous_namespace{PythonPluginBridge.cpp} Namespace Reference

Classes

struct  PluginInstanceHandle

Functions

void discard_pending_capture_without_python (const std::string &plugin_key)

Variables

std::string g_active_plugin_key
std::mutex g_registry_mutex
std::unordered_map< std::string, std::vector< py::object > > g_pending_capabilities
std::unordered_map< std::string, py::object > g_pending_package
std::unordered_map< std::string, PluginPermissions > g_pending_permissions

Function Documentation

◆ discard_pending_capture_without_python()

void Slic3r::anonymous_namespace{PythonPluginBridge.cpp}::discard_pending_capture_without_python ( const std::string & plugin_key)
77{
78 std::lock_guard<std::mutex> lock(g_registry_mutex);
79 auto capabilities = g_pending_capabilities.find(plugin_key);
80 if (capabilities != g_pending_capabilities.end()) {
81 for (py::object& capability : capabilities->second)
82 (void) capability.release();
83 g_pending_capabilities.erase(capabilities);
84 }
85
86 auto package = g_pending_package.find(plugin_key);
87 if (package != g_pending_package.end()) {
88 (void) package->second.release();
89 g_pending_package.erase(package);
90 }
91
92 g_pending_permissions.erase(plugin_key);
93}
std::unordered_map< std::string, std::vector< py::object > > g_pending_capabilities
Definition PythonPluginBridge.cpp:51
std::mutex g_registry_mutex
Definition PythonPluginBridge.cpp:50

References discard_pending_capture_without_python(), g_pending_capabilities, g_pending_package, g_pending_permissions, and g_registry_mutex.

Referenced by discard_pending_capture_without_python().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_active_plugin_key

std::string Slic3r::anonymous_namespace{PythonPluginBridge.cpp}::g_active_plugin_key
thread_local

◆ g_pending_capabilities

std::unordered_map<std::string, std::vector<py::object> > Slic3r::anonymous_namespace{PythonPluginBridge.cpp}::g_pending_capabilities

◆ g_pending_package

std::unordered_map<std::string, py::object> Slic3r::anonymous_namespace{PythonPluginBridge.cpp}::g_pending_package

◆ g_pending_permissions

std::unordered_map<std::string, PluginPermissions> Slic3r::anonymous_namespace{PythonPluginBridge.cpp}::g_pending_permissions

◆ g_registry_mutex

std::mutex Slic3r::anonymous_namespace{PythonPluginBridge.cpp}::g_registry_mutex