DeviceManager: Initial class with DeviceSpecParser

Hopefully by the end of tonight we should be done with the dev
spec parser.
This commit is contained in:
2025-01-05 14:19:53 -04:00
parent f16d3b24b3
commit 6307d2869e
9 changed files with 128 additions and 2 deletions
@@ -0,0 +1,26 @@
#ifndef DEVICEMANAGER_H
#define DEVICEMANAGER_H
#include <vector>
#include <string>
#include <opts.h>
class DeviceManager
{
public:
static DeviceManager& getInstance()
{
static DeviceManager instance;
return instance;
}
void handleDeviceSpecifiers(const OptionParser& options);
private:
DeviceManager() = default;
~DeviceManager() = default;
DeviceManager(const DeviceManager&) = delete;
DeviceManager& operator=(const DeviceManager&) = delete;
};
#endif // DEVICEMANAGER_H
@@ -0,0 +1,12 @@
#ifndef DEVICESPECPARSER_H
#define DEVICESPECPARSER_H
#include <string>
#include <vector>
#include <utility>
std::vector<std::string> readDeviceFile(const std::string& filename);
std::vector<std::pair<std::string, std::string>> parseDeviceSpecifiers(
const std::vector<std::string>& deviceStrings);
#endif // DEVICESPECPARSER_H