Updated application to code to accomodate changes to TDF format (new pad elements and changes to variant elements)

This commit is contained in:
Nav
2024-08-16 22:50:06 +01:00
parent 129e54dd2d
commit c662e946ca
35 changed files with 534 additions and 311 deletions

View File

@@ -0,0 +1,45 @@
#pragma once
#include <cstdint>
#include <string>
#include <vector>
namespace Targets
{
enum class TargetPadType: std::uint8_t
{
GPIO,
GND,
VCC,
OTHER,
};
using TargetPadId = std::size_t;
struct TargetPadDescriptor
{
public:
const TargetPadId id;
const std::string key;
std::string name;
TargetPadType type = TargetPadType::OTHER;
TargetPadDescriptor(
const std::string& key,
const std::string& name,
TargetPadType type
);
TargetPadDescriptor(const TargetPadDescriptor& other) = delete;
TargetPadDescriptor& operator = (const TargetPadDescriptor& other) = delete;
TargetPadDescriptor(TargetPadDescriptor&& other) noexcept = default;
bool operator == (const TargetPadDescriptor& other) const;
bool operator != (const TargetPadDescriptor& other) const;
static TargetPadId generateId(const std::string& padKey);
};
using TargetPadDescriptors = std::vector<TargetPadDescriptor*>;
}