DevMgr: Add sensorDevSpecs list and make intero/extro lists use unique_ptr
This commit is contained in:
@@ -4,14 +4,16 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <memory>
|
||||
#include <opts.h>
|
||||
#include <deviceManager/deviceManager.h>
|
||||
|
||||
|
||||
std::vector<DeviceManager::InteroceptorDeviceSpec>
|
||||
std::vector<std::unique_ptr<DeviceManager::InteroceptorDeviceSpec>>
|
||||
DeviceManager::interoceptorDeviceSpecs;
|
||||
std::vector<DeviceManager::ExtrospectorDeviceSpec>
|
||||
std::vector<std::unique_ptr<DeviceManager::ExtrospectorDeviceSpec>>
|
||||
DeviceManager::extrospectorDeviceSpecs;
|
||||
std::vector<std::reference_wrapper<DeviceManager::SensorDeviceSpec>>
|
||||
DeviceManager::sensorDeviceSpecs;
|
||||
|
||||
std::ostream& operator<<(
|
||||
std::ostream& os, const DeviceManager::SensorDeviceSpec& spec)
|
||||
@@ -35,11 +37,11 @@ const std::string DeviceManager::printDeviceSpecs(void)
|
||||
std::ostringstream oss;
|
||||
|
||||
for (const auto& spec : DeviceManager::interoceptorDeviceSpecs) {
|
||||
oss << "Interoceptor " << spec;
|
||||
oss << "Interoceptor " << *spec;
|
||||
}
|
||||
|
||||
for (const auto& spec : DeviceManager::extrospectorDeviceSpecs) {
|
||||
oss << "Extrospector " << spec;
|
||||
oss << "Extrospector " << *spec;
|
||||
}
|
||||
|
||||
return oss.str();
|
||||
|
||||
Reference in New Issue
Block a user