From 479cfafe5a70bb8c32cf4e357ed103541338ac0c Mon Sep 17 00:00:00 2001 From: Antonio SJ Musumeci Date: Sun, 28 Jan 2024 22:45:38 -0600 Subject: [PATCH] checkpoint --- src/branch_tier.cpp | 21 +++++++++++++++++++++ src/branch_tier.hpp | 20 ++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 src/branch_tier.cpp create mode 100644 src/branch_tier.hpp diff --git a/src/branch_tier.cpp b/src/branch_tier.cpp new file mode 100644 index 00000000..daab33a0 --- /dev/null +++ b/src/branch_tier.cpp @@ -0,0 +1,21 @@ +#include "branch_tier.hpp" + +#include "fmt/core.h" + +BranchTier::BranchTier() +{ + +} + +BranchTier::BranchTier(toml::value const &v_) +{ + auto const &branches = toml::find(v_,"branch").as_array(); + + for(auto const &branch : branches) + { + auto const &table = branch.as_table(); + + std::string s = table.at("type").as_string(); + fmt::print("{}\n",s); + } +} diff --git a/src/branch_tier.hpp b/src/branch_tier.hpp new file mode 100644 index 00000000..a660044f --- /dev/null +++ b/src/branch_tier.hpp @@ -0,0 +1,20 @@ +#pragma once + +#include "branch2.hpp" + +#include "toml.hpp" + +#include + +class BranchTier +{ +public: + BranchTier(); + BranchTier(toml::value const &); + +public: + uint64_t min_free_space; + +private: + std::vector _branches; +};