SimpleWebConsolePlugin¶
-
class SimpleWebConsolePlugin : public cppmicroservices::AbstractWebConsolePlugin¶
SimpleWebConsolePlugin is a utility class that provides a default implementation of the AbstractWebConsolePlugin and supports the following features:
Methods for (un)registering the web console plugin service
Default implementation for resource loading
Public Functions
-
SimpleWebConsolePlugin(std::string const &label, std::string const &title, std::string category = std::string(), std::vector<std::string> css = std::vector<std::string>())¶
Creates new Simple Web Console Plugin with the given category.
- Parameters:
label – the front label. See AbstractWebConsolePlugin::GetLabel()
title – the plugin title . See AbstractWebConsolePlugin::GetTitle()
category – the plugin’s navigation category. See AbstractWebConsolePlugin::GetCategory()
css – the additional plugin CSS. See AbstractWebConsolePlugin::GetCssReferences()
-
virtual std::string GetLabel() const¶
See also
-
virtual std::string GetTitle() const¶
See also
-
virtual std::string GetCategory() const¶
-
std::shared_ptr<SimpleWebConsolePlugin> Register(BundleContext const &context = GetBundleContext())¶
This is an utility method.
It is used to register the plugin service. Don’t forget to call Unregister() when the plugin is no longer needed.
- Parameters:
context – the bundle context used for service registration.
- Returns:
A shared pointer to this plugin.
-
void Unregister()¶
An utility method that removes the service, registered by the Register(const BundleContext&) method.
Protected Functions
-
std::vector<std::string> GetCssReferences() const¶
-
BundleContext GetContext() const¶