Open Lighting Architecture  Latest Git
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PluginLoader.h
1 /*
2  * This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU Library General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software
14  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
15  *
16  * PluginLoader.h
17  * Interface for the PluginLoader classes
18  * Copyright (C) 2005 Simon Newton
19  */
20 
21 #ifndef OLAD_PLUGINLOADER_H_
22 #define OLAD_PLUGINLOADER_H_
23 
24 #include <vector>
25 
26 #include "ola/base/Macro.h"
27 
28 namespace ola {
29 
33 class PluginLoader {
34  public:
35  PluginLoader() : m_plugin_adaptor(NULL) {}
36  virtual ~PluginLoader() {}
37 
42  void SetPluginAdaptor(class PluginAdaptor *adaptor) {
43  m_plugin_adaptor = adaptor;
44  }
45 
51  virtual std::vector<class AbstractPlugin*> LoadPlugins() = 0;
52 
59  virtual void UnloadPlugins() = 0;
60 
61  protected:
62  class PluginAdaptor *m_plugin_adaptor;
63 
64  private:
66 };
67 } // namespace ola
68 #endif // OLAD_PLUGINLOADER_H_
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Creates dummy copy constructor and assignment operator declarations.
Definition: Macro.h:44
void SetPluginAdaptor(class PluginAdaptor *adaptor)
Set the PluginAdaptor to use for the plugins.
Definition: PluginLoader.h:42
Definition: PluginAdaptor.h:41
virtual std::vector< class AbstractPlugin * > LoadPlugins()=0
Load the plugins.
Helper macros.
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
virtual void UnloadPlugins()=0
Unload all previously loaded plugins.
The interface used to load plugins.
Definition: PluginLoader.h:33