Files
libconfig/build-config/reflect-cpp/include/rfl/parsing/Parser_vectorstring.hpp
Emily Boudreaux ec13264050 feat(reflect-cpp): Switched from glaze -> reflect cpp
A bug was discovered in glaze which prevented valid toml output. We have
switched to toml++ and reflect-cpp. The interface has remained the same
so this should not break any code
2025-12-06 10:55:46 -05:00

39 lines
1.0 KiB
C++

#ifndef RFL_PARSING_PARSER_VECTORSRING_HPP_
#define RFL_PARSING_PARSER_VECTORSRING_HPP_
#include <map>
#include "../Result.hpp"
#include "../Vectorstring.hpp"
#include "Parent.hpp"
#include "Parser_base.hpp"
#include "schema/Type.hpp"
namespace rfl::parsing {
template <class R, class W, class ProcessorsType>
requires AreReaderAndWriter<R, W, Vectorstring>
struct Parser<R, W, Vectorstring, ProcessorsType> {
using InputVarType = typename R::InputVarType;
using ParentType = Parent<W>;
static Result<Vectorstring> read(const R& _r,
const InputVarType& _var) noexcept {
return _r.template to_basic_type<Vectorstring>(_var);
}
template <class P>
static void write(const W& _w, const Vectorstring& _b, const P& _parent) {
ParentType::add_value(_w, _b, _parent);
}
static schema::Type to_schema(
[[maybe_unused]] std::map<std::string, schema::Type>* _definitions) {
return schema::Type{schema::Type::Vectorstring{}};
}
};
} // namespace rfl::parsing
#endif