-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathPluginHelper.hpp
48 lines (40 loc) · 1.5 KB
/
PluginHelper.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#include <vector>
#include <map>
#include <string>
#include "PkgConfigRegistry.hpp"
namespace orocos_cpp
{
class PluginHelper
{
private:
static std::map<std::string, std::vector<std::string> > componentToTypeKitsMap;
public:
static void loadAllPluginsInDir(const std::string &path);
static bool loadAllTypekitAndTransports();
/**
* This function loads the typekits and transports of the given
* component.
* */
static bool loadTypekitAndTransports(const std::string &typekitName);
/**
* This method loads all typkits required for a task model.
* All typekits were loaded to properly create a TaskContextProxy for an
* task of the given model type.
* This includes the load of all typekits that are directly required and all
* depended requirements.
* @param modelName The Name of a task model, e.g., "camera_usb::Task"
* @return Returns True if new task models were loaded. Returns False if no
* model was loaded (also if no load was required)!
* @throws std::runtime_error if errors during loading of a typekit occur
*/
static bool loadAllTypekitsForModel(const std::string &modelName);
/**
* This function parses the local pkg_config file to
* figure out which typkits are need by the given component.
*
* @return A vector containing the names of the needed typekits
* */
static std::vector<std::string> getNeededTypekits(const std::string &componentName);
};
}//end of namespace