Fawkes API
Fawkes Development Version
plugin_director_thread.h
1
2
/***************************************************************************
3
* plugin_director_thread.h - CEDAR plugin manager access
4
*
5
* Created: Fri Dec 13 18:21:18 2013
6
* Copyright 2006-2013 Tim Niemueller [www.niemueller.de]
7
****************************************************************************/
8
9
/* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
13
*
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU Library General Public License for more details.
18
*
19
* Read the full text in the LICENSE.GPL file in the doc directory.
20
*/
21
22
#ifndef __PLUGINS_CEDAR_PLUGIN_DIRECTOR_THREAD_H_
23
#define __PLUGINS_CEDAR_PLUGIN_DIRECTOR_THREAD_H_
24
25
#include <aspect/plugin_director.h>
26
#include <core/threading/thread.h>
27
28
#include <list>
29
#include <string>
30
31
class
CedarPluginDirectorThread
:
public
fawkes::Thread
,
public
fawkes::PluginDirectorAspect
32
{
33
/** Cedar thread can access private API. */
34
friend
class
CedarThread
;
35
36
public
:
37
CedarPluginDirectorThread
();
38
virtual
~CedarPluginDirectorThread
();
39
40
virtual
void
loop
();
41
42
/** Stub to see name in backtrace for easier debugging. @see Thread::run() */
43
protected
:
44
virtual
void
45
run
()
46
{
47
Thread::run();
48
}
49
50
private
:
51
std::list<std::string>
52
get_loaded_plugins()
53
{
54
return
plugin_manager
->
get_loaded_plugins
();
55
}
56
57
std::list<std::pair<std::string, std::string>>
58
get_available_plugins()
59
{
60
return
plugin_manager
->
get_available_plugins
();
61
}
62
};
63
64
#endif
fawkes::PluginDirectorAspect
Definition:
plugin_director.h:38
CedarPluginDirectorThread::run
virtual void run()
Stub to see name in backtrace for easier debugging.
Definition:
plugin_director_thread.h:50
CedarPluginDirectorThread::CedarPluginDirectorThread
CedarPluginDirectorThread()
Constructor.
Definition:
plugin_director_thread.cpp:32
CedarThread
Definition:
cedar_thread.h:40
fawkes::PluginManager::get_available_plugins
std::list< std::pair< std::string, std::string > > get_available_plugins()
Generate list of all available plugins.
Definition:
manager.cpp:224
fawkes::PluginManager::get_loaded_plugins
std::list< std::string > get_loaded_plugins()
Get list of loaded plugins.
Definition:
manager.cpp:240
fawkes::PluginDirectorAspect::plugin_manager
PluginManager * plugin_manager
Definition:
plugin_director.h:53
CedarPluginDirectorThread::~CedarPluginDirectorThread
virtual ~CedarPluginDirectorThread()
Destructor.
Definition:
plugin_director_thread.cpp:38
CedarPluginDirectorThread::loop
virtual void loop()
Code to execute in the thread.
Definition:
plugin_director_thread.cpp:43
fawkes::Thread
Definition:
thread.h:45
CedarPluginDirectorThread
Definition:
plugin_director_thread.h:31
src
plugins
cedar
plugin_director_thread.h
Generated by
1.8.17