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:
@@ -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
|
||||
Reference in New Issue
Block a user