mirror of
https://github.com/Lurkki14/tuxclocker.git
synced 2025-02-25 18:55:24 -06:00
start library rewrite in C++
This commit is contained in:
parent
8afe7956cb
commit
8eb738b9ff
34
src/include/Device.hpp
Normal file
34
src/include/Device.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <variant>
|
||||
#include <vector>
|
||||
|
||||
namespace TuxClocker {
|
||||
namespace Device {
|
||||
|
||||
template <typename T>
|
||||
struct Range {
|
||||
Range();
|
||||
Range(const T &min_, const T &max_) {min = min_, max = max_;}
|
||||
T min, max;
|
||||
};
|
||||
|
||||
struct Enumeration {
|
||||
Enumeration(const std::string &name_, const uint &key_) {name = name_; key = key_;}
|
||||
std::string name;
|
||||
uint key;
|
||||
};
|
||||
|
||||
using RangeInfo = std::variant<Range<int>, Range<double>>;
|
||||
using AssignableInfo = std::variant<RangeInfo, std::vector<Enumeration>>;
|
||||
|
||||
class Assignable {
|
||||
public:
|
||||
Assignable();
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
};
|
9
src/include/Plugin.hpp
Normal file
9
src/include/Plugin.hpp
Normal file
@ -0,0 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
namespace TuxClocker {
|
||||
namespace Plugin {
|
||||
|
||||
class DevicePlugin {
|
||||
};
|
||||
|
||||
};
|
25
src/include/Tree.hpp
Normal file
25
src/include/Tree.hpp
Normal file
@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace TuxClocker {
|
||||
|
||||
template <typename T>
|
||||
class FlatTreeNode {
|
||||
T value;
|
||||
std::vector<int> childIndices;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class FlatTree {
|
||||
std::vector<FlatTreeNode<T>> nodes;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class TreeNode {
|
||||
private:
|
||||
T value;
|
||||
std::vector<TreeNode<T>> children;
|
||||
};
|
||||
|
||||
};
|
1
src/plugins/AMD.cpp
Normal file
1
src/plugins/AMD.cpp
Normal file
@ -0,0 +1 @@
|
||||
|
Loading…
Reference in New Issue
Block a user