SimpleWebConsolePlugin¶
-
class
cppmicroservices::
SimpleWebConsolePlugin
¶ 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
Inherits from cppmicroservices::AbstractWebConsolePlugin
Public Functions
-
SimpleWebConsolePlugin
(const std::string &label, const std::string &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()
-
std::string
GetLabel
() const¶
-
std::string
GetTitle
() const¶
-
std::string
GetCategory
() const¶
-
std::shared_ptr<SimpleWebConsolePlugin>
Register
(const BundleContext &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.
- Return
- A shared pointer to this plugin.
- Parameters
context
: the bundle context used for service registration.
-
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¶