This class implements a manager for all plugins available for the Ocean framework.
More...
|
enum | PluginType {
TYPE_UNKNOWN = 0
, TYPE_DEVICE = 1 << 0
, TYPE_INTERACTION = 1 << 1
, TYPE_MEDIA = 1 << 2
,
TYPE_RENDERING = 1 << 3
, TYPE_SCENEDESCRIPTION = 1 << 4
, TYPE_PHYSICS = 1 << 5
, TYPE_ANY = TYPE_DEVICE | TYPE_INTERACTION | TYPE_MEDIA | TYPE_RENDERING | TYPE_SCENEDESCRIPTION | TYPE_PHYSICS
} |
| Definition of different plugin types. More...
|
|
enum | PluginPriority {
PRIORITY_UNDEFINED
, PRIORITY_LOW
, PRIORITY_MEDIUM
, PRIORITY_HIGH
,
PRIORITY_VERY_HIGH
} |
| Definition of different plugin load priority values. More...
|
|
typedef std::set< PluginType > | PluginTypeSet |
| Definition of a set holding plugin types. More...
|
|
typedef std::vector< std::string > | Names |
| Definition of a vector holding plugin names. More...
|
|
This class implements a manager for all plugins available for the Ocean framework.
◆ Names
Definition of a vector holding plugin names.
◆ Plugins
Definition of a vector holding plugin objects.
◆ PluginSet
Definition of a set holding plugin objects.
◆ PluginTypeSet
Definition of a set holding plugin types.
◆ PluginPriority
Definition of different plugin load priority values.
Higher priority means that the plugin will be loaded earlier than plugins with lower priority.
Enumerator |
---|
PRIORITY_UNDEFINED | Undefined plugin load priority.
|
PRIORITY_LOW | Low plugin load priority.
|
PRIORITY_MEDIUM | Medium plugin load priority.
|
PRIORITY_HIGH | High plugin load priority.
|
PRIORITY_VERY_HIGH | Very high plugin load priority.
|
◆ PluginType
Definition of different plugin types.
Enumerator |
---|
TYPE_UNKNOWN | Unknown plugin type.
|
TYPE_DEVICE | Device plugin.
|
TYPE_INTERACTION | Interaction plugin.
|
TYPE_MEDIA | Media plugin.
|
TYPE_RENDERING | Rendering plugin.
|
TYPE_SCENEDESCRIPTION | Scene description plugin.
|
TYPE_PHYSICS | Physics plugin.
|
TYPE_ANY | Any plugin.
|
◆ PluginManager()
Ocean::PluginManager::PluginManager |
( |
| ) |
|
|
private |
Creates a new plugin manager object.
◆ ~PluginManager()
Ocean::PluginManager::~PluginManager |
( |
| ) |
|
|
private |
Destructs a plugin manager object.
◆ collectPlugins()
unsigned int Ocean::PluginManager::collectPlugins |
( |
const std::string & |
directory, |
|
|
const bool |
removeAlreadyCollected = true |
|
) |
| |
Collects all Ocean supported plugins available in a given directory.
- Parameters
-
directory | Plugin directory |
removeAlreadyCollected | State determining whether previous collected (but not loaded) plugins will be remove before |
- Returns
- Number of collected plugins
◆ determinePlugin()
static bool Ocean::PluginManager::determinePlugin |
( |
const std::string & |
filename, |
|
|
Plugin & |
plugin |
|
) |
| |
|
staticprivate |
Determines whether a given file is a plugin.
- Parameters
-
filename | Filename of the potential plugin |
plugin | Resulting plugin object, if succeeded |
- Returns
- True, if succeeded
◆ determinePluginApple()
static bool Ocean::PluginManager::determinePluginApple |
( |
const std::string & |
filename, |
|
|
Plugin & |
plugin |
|
) |
| |
|
staticprivate |
Determines whether a given file is a plugin (specialization for Apple platforms)
- See also
- determinePlugin()
- Parameters
-
filename | Filename of the potential plugin |
plugin | Resulting plugin object, if succeeded |
- Returns
- True, if succeeded
◆ fileExtension()
const std::string & Ocean::PluginManager::fileExtension |
( |
| ) |
const |
|
inline |
Returns the file extension for plugin files.
- Returns
- File extension of plugins
◆ loadAllPlugins()
bool Ocean::PluginManager::loadAllPlugins |
( |
| ) |
|
Loads all available plugins.
- Returns
- True, if at least one plugin has been loaded
◆ loadedPlugins()
Names Ocean::PluginManager::loadedPlugins |
( |
| ) |
const |
Returns all loaded plugins.
- Returns
- Plugin names
◆ loadPlugin()
bool Ocean::PluginManager::loadPlugin |
( |
const std::string & |
name | ) |
|
Loads a specific plugin.
- Parameters
-
name | The name of the plugin to load. |
- Returns
- True, if succeeded
◆ loadPlugins() [1/2]
bool Ocean::PluginManager::loadPlugins |
( |
const Names & |
names | ) |
|
Loads several plugins and uses the internal dependency order.
- Parameters
-
names | Names of the plugins to load |
- Returns
- True, if at least one plugin has been loaded
◆ loadPlugins() [2/2]
bool Ocean::PluginManager::loadPlugins |
( |
const PluginType |
type | ) |
|
Loads all plugins with a specified type.
- Parameters
-
type | Plugin type to load, can be a combination of all defined plugin types |
- Returns
- True, if at least one plugin has been loaded
◆ plugins()
Names Ocean::PluginManager::plugins |
( |
| ) |
const |
Returns all available plugins.
- Returns
- Plugin names
◆ release()
void Ocean::PluginManager::release |
( |
| ) |
|
Releases the plugin manager and unloads all plugins.
◆ setPluginFileExtension()
bool Ocean::PluginManager::setPluginFileExtension |
( |
const std::string & |
extension | ) |
|
Sets the file extension for plugin files.
- Parameters
-
extension | File extension to be set |
- Returns
- True, if succeeded
◆ translateType()
static PluginType Ocean::PluginManager::translateType |
( |
const std::string & |
type | ) |
|
|
staticprivate |
Translates a plugin type string to a plugin type id.
- Parameters
-
type | Plugin type string to translate |
- Returns
- Plugin type id
◆ unloadAllPlugins()
bool Ocean::PluginManager::unloadAllPlugins |
( |
| ) |
|
Unloads all loaded plugins.
- Returns
- True, if all plugins could be unloaded successfully
◆ unloadedPlugins()
Names Ocean::PluginManager::unloadedPlugins |
( |
| ) |
const |
Returns all not loaded plugins.
- Returns
- Plugin names
◆ Singleton< PluginManager >
◆ collectedPlugins_
Plugins Ocean::PluginManager::collectedPlugins_ |
|
private |
Vector holding all collected plugins.
◆ loadedPlugins_
Plugins Ocean::PluginManager::loadedPlugins_ |
|
private |
Vector holding all loaded plugins.
◆ lock_
Lock Ocean::PluginManager::lock_ |
|
mutableprivate |
◆ pluginFileExtension_
std::string Ocean::PluginManager::pluginFileExtension_ |
|
private |
File extension for plugins.
The documentation for this class was generated from the following file: