added file handle accessor for file reader/writer

This commit is contained in:
Jack Andersen 2015-10-23 12:23:04 -10:00
parent e861691480
commit 21724766ba
3 changed files with 9 additions and 0 deletions

View File

@ -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>

View File

@ -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

View File

@ -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