Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JBinaryFileReader.hh
Go to the documentation of this file.
1#ifndef __JIO__JBINARYFILEREADER__
2#define __JIO__JBINARYFILEREADER__
3
4#include <istream>
5
9
10#include "JIO/JStreamIO.hh"
12
13
14/**
15 * \author mdejong
16 */
17
18namespace JIO {}
19namespace JPP { using namespace JIO; }
20
21namespace JIO {
22
27
28
29 /**
30 * Object reading from binary file (i.e.\ .jpp).
31 */
32 template<class T, const bool = JLANG::JConversion<T,JSerialisable>::is_derived>
34
35 /**
36 * Template specialisation of JBinaryFileReader for serialisable data types.
37 *
38 * This class provides for an implementation of the JLANG::JAccessibleObjectIterator interface.
39 */
40 template<class T>
41 class JBinaryFileReader<T, true> :
44 public JStreamReader,
45 public JReaderObjectIterator<T>
46 {
47 public:
48 /**
49 * Default constructor.
50 */
53 JStreamReader (static_cast<std::istream&> (*this)),
54 JReaderObjectIterator<T>(static_cast<JStreamReader&>(*this))
55 {}
56 };
57
58
59 /**
60 * Template specialisation of JBinaryFileReader for unserialisable data types.
61 *
62 * This class provides for a null implementation of the JLANG::JAccessibleObjectIterator interface.
63 */
64 template<class T>
65 class JBinaryFileReader<T, false> :
67 public JNullAccess,
68 public JNullIterator<T>
69 {};
70}
71
72#endif
JBinaryFileReader()
Default constructor.
Object reading from binary file (i.e. .jpp).
Binary input based on std::istream.
Definition JStreamIO.hh:26
Interface for object iteration with named access.
Interface for null access.
Auxiliary classes and methods for binary I/O.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Implementation for null iteration.