SLIC  6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PluginLoader Class Reference

Loads user sim plugin classes from external shared libraries. More...

#include <PluginLoader.hh>

Public Member Functions

UserActionPlugin * create (std::string pluginName, std::string libName)
 
void destroy (UserActionPlugin *plugin)
 

Private Member Functions

void * getHandle (std::string pluginName)
 

Private Attributes

std::map< UserActionPlugin *, void * > pluginHandles_
 

Detailed Description

Loads user sim plugin classes from external shared libraries.

Definition at line 19 of file PluginLoader.hh.

Member Function Documentation

◆ create()

UserActionPlugin * create ( std::string  pluginName,
std::string  libName 
)

Create a user sim plugin with the given name from the supplied library name.

Parameters
pluginNameThe name of the plugin.
libNameThe name of the shared library.

Definition at line 7 of file PluginLoader.cc.

References LOG::endl, and PluginLoader::pluginHandles_.

Referenced by PluginManager::create().

◆ destroy()

void destroy ( UserActionPlugin *  plugin)

Destroy an existing user sim plugin.

Parameters
pluginThe sim plugin to destroy.

Definition at line 53 of file PluginLoader.cc.

References LOG::endl, UserActionPlugin::getName(), and PluginLoader::pluginHandles_.

Referenced by PluginManager::destroy().

◆ getHandle()

void* getHandle ( std::string  pluginName)
private

Get a handle for a plugin.

Parameters
pluginNameThe name of the plugin.

Member Data Documentation

◆ pluginHandles_

std::map<UserActionPlugin*, void*> pluginHandles_
private

Map of plugins to their handles.

Definition at line 50 of file PluginLoader.hh.

Referenced by PluginLoader::create(), and PluginLoader::destroy().


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