Jpp
19.3.0-rc.2
the software that should make you happy
Loading...
Searching...
No Matches
software
JIO
JBinaryFileReader.hh
Go to the documentation of this file.
1
#ifndef __JIO__JBINARYFILEREADER__
2
#define __JIO__JBINARYFILEREADER__
3
4
#include <istream>
5
6
#include "
JLang/JAccessibleBinaryStream.hh
"
7
#include "
JLang/JObjectIterator.hh
"
8
#include "
JLang/JConversion.hh
"
9
10
#include "
JIO/JStreamIO.hh
"
11
#include "
JIO/JReaderObjectIterator.hh
"
12
13
14
/**
15
* \author mdejong
16
*/
17
18
namespace
JIO
{}
19
namespace
JPP
{
using namespace
JIO
; }
20
21
namespace
JIO
{
22
23
using
JLANG::JAccessibleObjectIterator
;
24
using
JLANG::JAccessibleBinaryInputStream
;
25
using
JLANG::JNullAccess
;
26
using
JLANG::JNullIterator
;
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>
33
class
JBinaryFileReader
;
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> :
42
public
JAccessibleObjectIterator
<T>,
43
public
JAccessibleBinaryInputStream
,
44
public
JStreamReader
,
45
public
JReaderObjectIterator
<T>
46
{
47
public
:
48
/**
49
* Default constructor.
50
*/
51
JBinaryFileReader
() :
52
JAccessibleBinaryInputStream
(),
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> :
66
public
JAccessibleObjectIterator
<T>,
67
public
JNullAccess
,
68
public
JNullIterator
<T>
69
{};
70
}
71
72
#endif
JAccessibleBinaryStream.hh
JConversion.hh
JObjectIterator.hh
JReaderObjectIterator.hh
JStreamIO.hh
JIO::JBinaryFileReader< T, true >::JBinaryFileReader
JBinaryFileReader()
Default constructor.
Definition
JBinaryFileReader.hh:51
JIO::JBinaryFileReader
Object reading from binary file (i.e. .jpp).
Definition
JBinaryFileReader.hh:33
JIO::JReaderObjectIterator
JReader object iterator.
Definition
JReaderObjectIterator.hh:30
JIO::JStreamReader
Binary input based on std::istream.
Definition
JStreamIO.hh:26
JLANG::JAccessibleBinaryInputStream
Accessible binary input stream.
Definition
JAccessibleBinaryStream.hh:27
JLANG::JAccessibleObjectIterator
Interface for object iteration with named access.
Definition
JObjectIterator.hh:377
JLANG::JNullAccess
Interface for null access.
Definition
JAccessible.hh:67
JIO
Auxiliary classes and methods for binary I/O.
Definition
JBinaryFileReader.hh:18
JPP
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Definition
JAAnetToolkit.hh:43
std
Definition
JSTDTypes.hh:14
JLANG::JNullIterator
Implementation for null iteration.
Definition
JObjectIterator.hh:329
Generated by
1.12.0