31 std::string m_program;
32 std::vector<std::string> m_args;
35 [[maybe_unused]] std::string
const& get_program()
const {
return m_program; }
36 [[maybe_unused]] std::vector<std::string>
const& get_args()
const {
return m_args; }
37 [[maybe_unused]]
void set_program(std::string_view str_program) { m_program = str_program; }
38 [[maybe_unused]]
void set_args(std::vector<std::string>
const& vec_args) { m_args = vec_args; }
60 return_if(str_raw_json.empty(), Error(
"D::Empty json data"));
64 boot.m_program = Pop(db(
"program").
template value<std::string>());
66 boot.m_args = Pop(db(
"args").value<std::vector<std::string>>());
79 db(
"program") =
boot.m_program;
80 db(
"args") =
boot.m_args;
Value< int > boot(int argc, char **argv)
Boots the main flatimage program and the portal process.
A type-safe wrapper around nlohmann::json for database operations.
friend Value< std::string > serialize(Boot const &boot) noexcept
Serializes a Boot class into a json string.
friend Value< Boot > deserialize(std::string_view str_raw_json) noexcept
Deserializes JSON string into a Binds object.
Boot()
Construct a new Boot:: Boot object.
A database that interfaces with nlohmann json.
Enhanced error handling framework built on std::expected.
Boot command configuration storage.
Value< std::string > serialize(Boot const &boot) noexcept
Serializes a Boot class into a json string.
Value< Boot > deserialize(std::string_view str_raw_json) noexcept
Deserializes a json string into a Boot class.
Value< Db > from_string(S &&s)
Parses a JSON string and creates a Db object.
Enhanced expected type with integrated logging capabilities.