![]() |
NDEVR
API Documentation
|
Container for all active Devices connected to the software. More...
Public Member Functions | |
| DeviceManager () | |
| Constructs an empty DeviceManager. | |
| void | addDevice (Device *device) |
| Registers a device with the manager. | |
| Device * | device (const UUID &id) |
| Returns the device with the given UUID. | |
| void | deviceRemovedSignal (const UUID &id) |
| Emitted when a device has been removed. | |
| void | devicesAddedSignal (const Buffer< UUID > &ids) |
| Emitted when one or more devices have been added. | |
| bool | hasDevice (const UUID &id) const |
| Checks whether a device with the given UUID is registered. | |
| void | removeDevice (const UUID &id) |
| Removes a device from the manager by its UUID. | |
| void | update () |
| Emits signals for any devices that have been added since the last update. | |
Static Public Member Functions | |
| static DeviceManager & | DefaultManager () |
| Returns the singleton default DeviceManager instance. | |
Protected Attributes | |
| Buffer< UUID > | m_added_objects |
| UUIDs of devices added but not yet signaled. | |
| Dictionary< UUID, Device * > | m_device_lookup |
| Map of device UUIDs to their Device pointers. | |
Container for all active Devices connected to the software.
Definition at line 10 of file DeviceManager.h.
| void DeviceManager::addDevice | ( | Device * | device | ) |
|
static |
Returns the singleton default DeviceManager instance.
References DeviceManager().
Returns the device with the given UUID.
| [in] | id | The UUID of the device to retrieve. |
Definition at line 32 of file DeviceManager.h.
References m_device_lookup.
Referenced by addDevice().
| void DeviceManager::deviceRemovedSignal | ( | const UUID & | id | ) |
Emitted when a device has been removed.
| [in] | id | The UUID of the removed device. |
Emitted when one or more devices have been added.
| [in] | ids | The UUIDs of the newly added devices. |
|
inline |
Checks whether a device with the given UUID is registered.
| [in] | id | The UUID of the device to check. |
Definition at line 23 of file DeviceManager.h.
References m_device_lookup.
| void DeviceManager::removeDevice | ( | const UUID & | id | ) |