2024-01-24 21:49:02 -06:00
|
|
|
#include "branch2.hpp"
|
2024-01-25 22:39:56 -06:00
|
|
|
|
2024-01-31 21:17:45 -06:00
|
|
|
#include <iostream>
|
|
|
|
|
|
2024-01-25 22:39:56 -06:00
|
|
|
|
2024-01-29 00:00:38 -06:00
|
|
|
Branch2::Branch2()
|
|
|
|
|
: mode(Mode::RW)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2024-01-25 22:39:56 -06:00
|
|
|
Branch2::Branch2(toml::value const &v_)
|
2024-01-29 00:02:15 -06:00
|
|
|
: mode(Mode::RW)
|
2024-01-25 22:39:56 -06:00
|
|
|
{
|
2024-01-31 21:17:45 -06:00
|
|
|
std::cout << v_ << '\n';
|
|
|
|
|
|
2024-01-29 00:07:09 -06:00
|
|
|
enabled = v_.at("enabled").as_boolean();
|
|
|
|
|
mode = Mode::_from_string(toml::find<std::string>(v_,"mode").c_str());
|
|
|
|
|
min_free_space = 0;
|
2024-01-29 00:07:45 -06:00
|
|
|
path = toml::find<std::string>(v_,"path");
|
2024-01-31 21:17:45 -06:00
|
|
|
|
2024-01-25 22:39:56 -06:00
|
|
|
}
|