CPluginManager Class Reference

#include <PluginManager.h>

List of all members.

Public Member Functions

MM::Device * LoadDevice (const char *label, const char *moduleName, const char *deviceName)
void UnloadDevice (MM::Device *device)
void UnloadAllDevices ()
MM::Device * GetDevice (const char *label) const
std::string GetDeviceLabel (const MM::Device &device) const
std::vector< std::string > GetDeviceList (MM::DeviceType t=MM::AnyType) const
std::string Serialize ()
void Restore (const std::string &data)

Static Public Member Functions

static std::vector< std::string > GetModules (const char *searchPath)
static std::vector< std::string > GetAvailableDevices (const char *moduleName) throw (CMMError)
static std::vector< std::string > GetAvailableDeviceDescriptions (const char *moduleName) throw (CMMError)
static std::vector< int > GetAvailableDeviceTypes (const char *moduleName) throw (CMMError)


Detailed Description

Manages the device collection. Responsible for handling plugin libraries and device construction and destruction

Member Function Documentation

MM::Device * CPluginManager::LoadDevice ( const char *  label,
const char *  moduleName,
const char *  deviceName 
)

Loads the device specified with the input parameters.

Parameters:
label device label - string identifier used to access the device in the calling code
moduleName the name of the plugin library (dll)
deviceName the name of the device. The name must correspond to one of the names recognized by the specific plugin library.
Returns:
a pointer to the new device

void CPluginManager::UnloadDevice ( MM::Device *  pDevice  ) 

Unloads the specified device from the core.

Parameters:
pDevice pointer to the device to unload

void CPluginManager::UnloadAllDevices (  ) 

Unloads all devices from the core and resets all configuration data.

MM::Device * CPluginManager::GetDevice ( const char *  label  )  const

Obtains the device corresponding to the label

Parameters:
label device label
Returns:
pointer to the device or 0 if the label is not recognized

string CPluginManager::GetDeviceLabel ( const MM::Device &  device  )  const

Obtains the label corresponding to the device pointer

Parameters:
pDevice device pointer
label device label
Returns:
true on success, false if the device pointer does not correspond to the currently loaded device

vector< string > CPluginManager::GetDeviceList ( MM::DeviceType  type = MM::AnyType  )  const

Obtains the list of labels for all currently loaded devices of the specific type. Use type MM::AnyDevice to obtain labels for the entire system.

Returns:
vector of device labels
Parameters:
type - device type

vector< string > CPluginManager::GetModules ( const char *  searchPath  )  [static]

List all modules (device libraries) in the search path.

vector< string > CPluginManager::GetAvailableDevices ( const char *  moduleName  )  throw (CMMError) [static]

List all available devices in the specified module.

vector< string > CPluginManager::GetAvailableDeviceDescriptions ( const char *  moduleName  )  throw (CMMError) [static]

List all available devices in the specified module.

vector< int > CPluginManager::GetAvailableDeviceTypes ( const char *  moduleName  )  throw (CMMError) [static]

List all device types in the specified module.


The documentation for this class was generated from the following files:
Generated on Thu Sep 18 12:35:23 2008 for MMCore by  doxygen 1.5.3-20070902