Open Lighting Architecture  Latest Git
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ola::Plugin Class Referenceabstract
Inheritance diagram for ola::Plugin:
Inheritance graph
[legend]
Collaboration diagram for ola::Plugin:
Collaboration graph
[legend]

Public Member Functions

 Plugin (PluginAdaptor *plugin_adaptor)
 
bool LoadPreferences ()
 Load the preferences for a plugin and set defaults.
 
std::string PreferenceConfigLocation () const
 The location for preferences. More...
 
bool IsEnabled () const
 Is the plugin enabled? More...
 
void SetEnabledState (bool enable)
 Set the plugin's enabled state. More...
 
virtual bool Start ()
 Start the plugin. More...
 
virtual bool Stop ()
 Stop the plugin. More...
 
virtual bool DefaultMode () const
 
virtual ola_plugin_id Id () const =0
 Get the plugin ID of this plugin. More...
 
virtual std::string PluginPrefix () const =0
 The prefix to use for storing configuration files. More...
 
virtual void ConflictsWith (std::set< ola_plugin_id > *) const
 
bool operator< (const AbstractPlugin &other) const
 
- Public Member Functions inherited from ola::AbstractPlugin
virtual std::string Name () const =0
 Get the plugin name. More...
 
virtual std::string Description () const =0
 

Protected Member Functions

virtual bool StartHook ()
 
virtual bool StopHook ()
 
virtual bool SetDefaultPreferences ()
 

Protected Attributes

PluginAdaptorm_plugin_adaptor
 
class Preferencesm_preferences
 

Static Protected Attributes

static const char ENABLED_KEY [] = "enabled"
 

Member Function Documentation

◆ Id()

virtual ola_plugin_id ola::Plugin::Id ( ) const
pure virtual

◆ IsEnabled()

bool ola::Plugin::IsEnabled ( ) const
virtual

Is the plugin enabled?

Returns
true if this plugin is enabled

Implements ola::AbstractPlugin.

◆ PluginPrefix()

virtual std::string ola::Plugin::PluginPrefix ( ) const
pure virtual

◆ PreferenceConfigLocation()

string ola::Plugin::PreferenceConfigLocation ( ) const
virtual

The location for preferences.

This can be anything really but should indicate to the user how the preferences were loaded.

Implements ola::AbstractPlugin.

◆ SetDefaultPreferences()

virtual bool ola::Plugin::SetDefaultPreferences ( )
inlineprotectedvirtual

Set default preferences.

◆ SetEnabledState()

void ola::Plugin::SetEnabledState ( bool  enable)
virtual

Set the plugin's enabled state.

Parameters
enableThe new enabled state
Returns
true if this plugin is enabled

Implements ola::AbstractPlugin.

◆ Start()

bool ola::Plugin::Start ( )
virtual

Start the plugin.

Calls StartHook() which can be overridden by the derived classes.

Returns
true if we started ok, false otherwise

Implements ola::AbstractPlugin.

◆ Stop()

bool ola::Plugin::Stop ( )
virtual

Stop the plugin.

Calls StopHook() which can be overridden by the derived classes.

Returns
true on success, false on failure

Implements ola::AbstractPlugin.


The documentation for this class was generated from the following files: