2024-01-26 00:41:09 -06:00
|
|
|
#include "branches2.hpp"
|
|
|
|
|
|
2024-01-28 21:34:09 -06:00
|
|
|
#include "fmt/core.h"
|
2024-01-28 21:33:28 -06:00
|
|
|
|
2024-01-26 00:41:09 -06:00
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
|
Branches2::Branches2()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Branches2::Branches2(toml::value const &v_)
|
|
|
|
|
{
|
2024-01-27 00:49:38 -06:00
|
|
|
auto const &tiers = toml::find(v_,"tier");
|
2024-01-26 00:41:09 -06:00
|
|
|
|
2024-01-27 00:49:48 -06:00
|
|
|
for(auto const &tier : tiers.as_array())
|
2024-01-26 00:41:09 -06:00
|
|
|
{
|
2024-01-27 00:51:41 -06:00
|
|
|
auto const &branches = toml::find(tier,"branch");
|
|
|
|
|
|
|
|
|
|
for(auto const &branch : branches.as_array())
|
|
|
|
|
{
|
2024-01-27 01:00:17 -06:00
|
|
|
auto const &branch_table = branch.as_table();
|
2024-01-27 00:51:41 -06:00
|
|
|
|
2024-01-28 21:35:32 -06:00
|
|
|
std::string s = branch_table.at("type").as_string();
|
|
|
|
|
fmt::print("{}\n",s);
|
2024-01-27 00:51:41 -06:00
|
|
|
}
|
2024-01-26 00:41:09 -06:00
|
|
|
}
|
|
|
|
|
}
|