|
VLink
2.0.0
A high-performance communication middleware
|
Singleton accessor that owns a lazily loaded SchemaPluginInterface plugin.
More...
#include <schema_plugin_manager.h>
Public Member Functions | |
| bool | is_valid () const |
| Reports whether a plugin was successfully loaded. More... | |
| std::shared_ptr< SchemaPluginInterface > | get_interface () const |
Returns the shared plugin instance, or nullptr when the manager is invalid. More... | |
Static Public Member Functions | |
| static SchemaPluginManager & | get (const std::string &schema_plugin_path="") |
| Returns the process-wide manager, building it on the first call. More... | |
Singleton accessor that owns a lazily loaded SchemaPluginInterface plugin.
Subsequent get() invocations are cheap and return the cached singleton regardless of the argument passed; the very first call wins. The destructor releases the contained interface before tearing down the Plugin loader, ensuring the shared object outlives any dependent global objects inside it.
|
static |
Returns the process-wide manager, building it on the first call.
| schema_plugin_path | Absolute path to the plugin shared object. Empty means fall back to the VLINK_SCHEMA_PLUGIN environment variable. |
| std::shared_ptr<SchemaPluginInterface> vlink::SchemaPluginManager::get_interface | ( | ) | const |
Returns the shared plugin instance, or nullptr when the manager is invalid.
SchemaPluginInterface implementation. | bool vlink::SchemaPluginManager::is_valid | ( | ) | const |
Reports whether a plugin was successfully loaded.
true when get_interface() will yield a non-null pointer.