#ifndef DNA_HPP #define DNA_HPP #include "Global.hpp" #include "IStreamReader.hpp" #include "IStreamWriter.hpp" #include #include namespace Athena { namespace io { /** * @brief Base DNA class used against 'atdna' * * Athena bundles a build-tool called 'atdna'. This tool functions * just like the 'clang' compiler, except it emits */ template struct DNA { template using Value = T; template using Vector = std::vector; virtual void read(IStreamReader&)=0; virtual void write(IStreamWriter&) const=0; }; /** Macro to automatically declare read/write methods in subclasses */ #define DECL_DNA \ void read(Athena::io::IStreamReader&); \ void write(Athena::io::IStreamWriter&) const; \ } } #endif // DNA_HPP