38 lines
817 B
C++
38 lines
817 B
C++
#ifndef DEVICE_H
|
|
#define DEVICE_H
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#include <memory>
|
|
#include <sstream>
|
|
#include <user/deviceAttachmentSpec.h>
|
|
|
|
namespace smo {
|
|
namespace device {
|
|
|
|
class Device
|
|
{
|
|
public:
|
|
Device(const std::string& identifier) : deviceIdentifier(identifier) {}
|
|
|
|
std::string stringify() const
|
|
{
|
|
std::ostringstream os;
|
|
os << "Device Identifier: " << deviceIdentifier
|
|
<< ", Attachment Specs: " << deviceAttachmentSpecs.size() << std::endl;
|
|
for (const auto& spec : deviceAttachmentSpecs) {
|
|
os << " " << spec->stringify();
|
|
}
|
|
return os.str();
|
|
}
|
|
|
|
public:
|
|
std::string deviceIdentifier;
|
|
std::vector<std::shared_ptr<DeviceAttachmentSpec>> deviceAttachmentSpecs;
|
|
};
|
|
|
|
} // namespace device
|
|
} // namespace smo
|
|
|
|
#endif // DEVICE_H
|