mirror of https://github.com/libAthena/athena.git
added file handle accessor for file reader/writer
This commit is contained in:
parent
e861691480
commit
21724766ba
|
@ -11,6 +11,7 @@
|
|||
#include <yaml.h>
|
||||
#include <utf8proc.h>
|
||||
#include "DNA.hpp"
|
||||
#include "FileReader.hpp"
|
||||
|
||||
namespace Athena
|
||||
{
|
||||
|
@ -1226,6 +1227,12 @@ struct DNAYaml : DNA<DNAE>
|
|||
yaml_parser_delete(&parser);
|
||||
return retval;
|
||||
}
|
||||
|
||||
template<class DNASubtype>
|
||||
static bool ValidateFromYAMLFile(Athena::io::FileReader& fin)
|
||||
{
|
||||
return ValidateFromYAMLFile<DNASubtype>(fin._fileHandle());
|
||||
}
|
||||
};
|
||||
|
||||
template <size_t sizeVar, Endian VE>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue