Added XML support; #21

This commit is contained in:
Patrick Urbanke
2023-12-20 21:07:36 +01:00
parent 2281849dde
commit c5347eee28
124 changed files with 4652 additions and 1437 deletions
+32
View File
@@ -0,0 +1,32 @@
#ifndef RFL_XML_OUTPUTNULL_HPP_
#define RFL_XML_OUTPUTNULL_HPP_
#include <optional>
#include <pugixml.hpp>
#include <string>
#include "rfl/Ref.hpp"
#include "rfl/xml/OutputVar.hpp"
namespace rfl {
namespace xml {
class OutputNull : public OutputVar {
public:
OutputNull() {}
~OutputNull() = default;
/// Inserts all elements into the builder.
void insert(const std::string& _key, pugi::xml_node* _parent) final {
_parent->append_child(_key.c_str());
}
/// Whether this is null.
bool is_null() const final { return true; }
};
} // namespace xml
} // namespace rfl
#endif