Jpp  18.4.0
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JBinaryFileReader.hh
Go to the documentation of this file.
1 #ifndef __JIO__JBINARYFILEREADER__
2 #define __JIO__JBINARYFILEREADER__
3 
4 #include <istream>
5 
8 #include "JLang/JConversion.hh"
9 
10 #include "JIO/JStreamIO.hh"
12 
13 
14 /**
15  * \author mdejong
16  */
17 
18 namespace JIO {}
19 namespace JPP { using namespace JIO; }
20 
21 namespace JIO {
22 
25  using JLANG::JNullAccess;
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> :
42  public JAccessibleObjectIterator<T>,
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> :
66  public JAccessibleObjectIterator<T>,
67  public JNullAccess,
68  public JNullIterator<T>
69  {};
70 }
71 
72 #endif
Object reading from binary file (i.e. .jpp).
Interface for null access.
Definition: JAccessible.hh:65
then usage $script< detector file >< detectorfile > nIf the range of floors is the first detector file is aligned to the second before the comparison nIn this
Binary input based on std::istream.
Definition: JStreamIO.hh:24
do set_variable OUTPUT_DIRECTORY $WORKDIR T
Implementation for null iteration.
Interface for object iteration with named access.
Accessible binary input stream.
JBinaryFileReader()
Default constructor.
JReader object iterator.