diff --git a/include/Athena/DNAYaml.hpp b/include/Athena/DNAYaml.hpp index 4b7e456..a6488eb 100644 --- a/include/Athena/DNAYaml.hpp +++ b/include/Athena/DNAYaml.hpp @@ -11,6 +11,7 @@ #include #include #include "DNA.hpp" +#include "FileReader.hpp" namespace Athena { @@ -1226,6 +1227,12 @@ struct DNAYaml : DNA yaml_parser_delete(&parser); return retval; } + + template + static bool ValidateFromYAMLFile(Athena::io::FileReader& fin) + { + return ValidateFromYAMLFile(fin._fileHandle()); + } }; template diff --git a/include/Athena/FileReader.hpp b/include/Athena/FileReader.hpp index 461c1c2..bddd682 100644 --- a/include/Athena/FileReader.hpp +++ b/include/Athena/FileReader.hpp @@ -32,6 +32,7 @@ public: atUint64 readUBytesToBuf(void* buf, atUint64 len); void setCacheSize(const atInt32 blockSize); + FILE* _fileHandle() {return m_fileHandle;} protected: std::string m_filename; #if _WIN32 diff --git a/include/Athena/FileWriter.hpp b/include/Athena/FileWriter.hpp index e09c2fb..320e081 100644 --- a/include/Athena/FileWriter.hpp +++ b/include/Athena/FileWriter.hpp @@ -26,6 +26,7 @@ public: atUint64 length() const; void writeUBytes(const atUint8* data, atUint64 len); + FILE* _fileHandle() {return m_fileHandle;} private: std::string m_filename; #if _WIN32