11namespace fs = std::filesystem;
54 static inline const std::map<ParserFactory::Type, std::unordered_set<std::string>> EXTENSIONS {
68 static inline std::unordered_set<Prototype> lha_prototypes {};
93 void add_default_lha_prototypes(fs::path file_path);
108 void sanitize_file(
const fs::path& file_path);
124 void sanitize_tree(
const std::shared_ptr<DBNode>& root,
const std::vector<BlockName>& required_keys = {});
164 void write_to_file(fs::path file_path, std::shared_ptr<DBNode> root);
186 void add_lha_prototype(
BlockName blockName,
size_t itemCount=2,
size_t valueIdx=1,
int scaleIdx=-1,
int rgIdx=-1,
int binIdx=-1,
bool globalScale=
false);
Hierarchical key–value tree with JSON/YAML serialization.
Block identifier with alias support.
Front-end for reading and writing structured data as DBNodetrees.
void add_lha_prototype(BlockName blockName, size_t itemCount=2, size_t valueIdx=1, int scaleIdx=-1, int rgIdx=-1, int binIdx=-1, bool globalScale=false)
Adds or overrides an LHA block prototype used by LhaParser.
void write_to_file(fs::path file_path, std::shared_ptr< DBNode > root)
Writes a DBNodetree to disk using the appropriate format.
std::shared_ptr< DBNode > read_from_file(fs::path file_path)
Reads a structured file and returns its DBNoderepresentation.
Central factory for building concrete IDBNodeProvider objects.