// This function is loaded from the plugin (if present) and called during runtime initialization. // By the time this has been called the runtime has been fully initialized but not other native // libraries have been loaded yet. Failure to initialize is considered a fatal error. // TODO might want to give initialization function some arguments using PluginInitializationFunction = bool (*)(); using PluginDeinitializationFunction = bool (*)();
// A class encapsulating a plugin. There is no stable plugin ABI or API and likely never will be. // TODO Might want to put some locking in this but ATM we only load these at initialization in a // single-threaded fashion so not much need class Plugin { public: static Plugin Create(const std::string& lib) { return Plugin(lib);
}
// Create move constructor for putting this in a list
Plugin(Plugin&& other) noexcept
: library_(other.library_),
dlopen_handle_(other.dlopen_handle_) {
other.dlopen_handle_ = nullptr;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.