#ifndef __JIO__JBINARYFILEREADER__ #define __JIO__JBINARYFILEREADER__ #include #include "JLang/JAccessibleBinaryStream.hh" #include "JLang/JObjectIterator.hh" #include "JLang/JConversion.hh" #include "JIO/JStreamIO.hh" #include "JIO/JReaderObjectIterator.hh" /** * \author mdejong */ namespace JIO {} namespace JPP { using namespace JIO; } namespace JIO { using JLANG::JAccessibleObjectIterator; using JLANG::JAccessibleBinaryInputStream; using JLANG::JNullAccess; using JLANG::JNullIterator; /** * Object reading from binary file (i.e.\ .jpp). */ template::is_derived> class JBinaryFileReader; /** * Template specialisation of JBinaryFileReader for serialisable data types. * * This class provides for an implementation of the JLANG::JAccessibleObjectIterator interface. */ template class JBinaryFileReader : public JAccessibleObjectIterator, public JAccessibleBinaryInputStream, public JStreamReader, public JReaderObjectIterator { public: /** * Default constructor. */ JBinaryFileReader() : JAccessibleBinaryInputStream(), JStreamReader (static_cast (*this)), JReaderObjectIterator(static_cast(*this)) {} }; /** * Template specialisation of JBinaryFileReader for unserialisable data types. * * This class provides for a null implementation of the JLANG::JAccessibleObjectIterator interface. */ template class JBinaryFileReader : public JAccessibleObjectIterator, public JNullAccess, public JNullIterator {}; } #endif