|
VLink 2.0.0
A high-performance communication middleware
|
Singleton manager that owns and provides access to the SchemaPluginInterface.
More...
#include <schema_plugin_manager.h>
Public Member Functions | |
| bool | is_valid () const |
Returns true if a SchemaPluginInterface was successfully loaded. | |
| std::shared_ptr< SchemaPluginInterface > | get_interface () const |
Returns the loaded SchemaPluginInterface instance. | |
Static Public Member Functions | |
| static SchemaPluginManager & | get (const std::string &schema_plugin_path="") |
Returns the process-global SchemaPluginManager singleton. | |
Singleton manager that owns and provides access to the SchemaPluginInterface.
SchemaPluginManager is a process-level singleton that loads and holds a single SchemaPluginInterface plugin. The plugin path is resolved in the following order:
schema_plugin_path argument passed to get() on first call.VLINK_SCHEMA_PLUGIN environment variable if schema_plugin_path is empty.get() creates the singleton on first call; subsequent calls ignore schema_plugin_path.is_valid() returns false when no plugin was loaded.Plugin loader on destruction, ensuring safe unloading.
|
staticnodiscard |
Returns the process-global SchemaPluginManager singleton.
On the first call, loads the plugin from schema_plugin_path if non-empty, or from the VLINK_SCHEMA_PLUGIN environment variable. Subsequent calls return the same singleton regardless of schema_plugin_path.
| schema_plugin_path | Path to the plugin shared library. Empty = use env var. |
|
nodiscard |
Returns the loaded SchemaPluginInterface instance.
nullptr if not loaded.
|
nodiscard |
Returns true if a SchemaPluginInterface was successfully loaded.
true if get_interface() will return a non-null pointer.