Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JIO::JBinaryFileReader< T, false > Class Template Reference

Template specialisation of JBinaryFileReader for unserialisable data types. More...

#include <JBinaryFileReader.hh>

Inheritance diagram for JIO::JBinaryFileReader< T, false >:
JLANG::JAccessibleObjectIterator< T > JLANG::JNullAccess JLANG::JNullIterator< T > JLANG::JObjectIterator< T > JLANG::JAccessible JLANG::JAccessible JLANG::JObjectIterator< T > JLANG::JThrow< JAccessible > JLANG::JThrow< JAccessible >

Public Types

typedef JObjectIterator< T >::pointer_type pointer_type
 

Public Member Functions

virtual bool is_open () const override
 Check is device is open.
 
virtual void open (const char *file_name) override
 Open device.
 
virtual void close () override
 Close device.
 
virtual bool hasNext ()
 Check availability of next element.
 
virtual const pointer_typenext ()
 Get next element.
 
virtual skip_type skip (const skip_type ns)
 Skip items.
 

Static Public Member Functions

static void Throw (const bool option)
 Enable/disable throw option.
 
static int Throw (const JException_t &error, const int value=-1)
 Throw exception or return error.
 

Static Protected Attributes

static bool do_throw
 throw option
 

Private Attributes

pointer_type ps
 

Detailed Description

template<class T>
class JIO::JBinaryFileReader< T, false >

Template specialisation of JBinaryFileReader for unserialisable data types.

This class provides for a null implementation of the JLANG::JAccessibleObjectIterator interface.

Definition at line 65 of file JBinaryFileReader.hh.

Member Typedef Documentation

◆ pointer_type

template<class T >
JObjectIterator<T>::pointer_type JLANG::JNullIterator< T >::pointer_type
inherited

Definition at line 331 of file JObjectIterator.hh.

Member Function Documentation

◆ is_open()

virtual bool JLANG::JNullAccess::is_open ( ) const
inlineoverridevirtualinherited

Check is device is open.

Returns
true

Implements JLANG::JAccessible.

Definition at line 74 of file JAccessible.hh.

75 {
76 return true;
77 }

◆ open()

virtual void JLANG::JNullAccess::open ( const char * file_name)
inlineoverridevirtualinherited

Open device.

Parameters
file_namefile name

Implements JLANG::JAccessible.

Definition at line 85 of file JAccessible.hh.

86 {}

◆ close()

virtual void JLANG::JNullAccess::close ( )
inlineoverridevirtualinherited

Close device.

Implements JLANG::JAccessible.

Definition at line 92 of file JAccessible.hh.

93 {}

◆ hasNext()

template<class T >
virtual bool JLANG::JNullIterator< T >::hasNext ( )
inlinevirtualinherited

Check availability of next element.

Returns
false

Implements JLANG::JObjectIterator< T >.

Definition at line 339 of file JObjectIterator.hh.

340 {
341 return false;
342 }

◆ next()

template<class T >
virtual const pointer_type & JLANG::JNullIterator< T >::next ( )
inlinevirtualinherited

Get next element.

Returns
NULL

Implements JLANG::JObjectIterator< T >.

Definition at line 350 of file JObjectIterator.hh.

351 {
352 return ps;
353 }

◆ skip()

template<class T >
virtual skip_type JLANG::JObjectIterator< T >::skip ( const skip_type ns)
inlinevirtualinherited

Skip items.

Parameters
nsnumber of items to skip
Returns
number of items skipped

Reimplemented in JLANG::JAbstractObjectReader< T >, JLANG::JAbstractObjectReader< const event_type >, JLANG::JAbstractObjectReader< Evt >, JLANG::JAbstractObjectReader< JDAQSummaryslice >, JLANG::JAbstractObjectReader< JHead_t >, JLANG::JAbstractObjectReader< JTail_t >, JLANG::JAbstractObjectReader< JTypeList< JDAQEvent, JNullType > >, JLANG::JAbstractObjectReader< KM3NETDAQ::JDAQEvent >, JLANG::JPipe< T >, JLANG::JPipe< JHead_t >, JLANG::JPipe< JTail_t >, JLANG::JSTDObjectIterator< T >, JROOT::JRootFileReader< T, false >, JROOT::JTreeReaderObjectIterator< T >, JSUPPORT::JMultipleFileScanner< T >, JSUPPORT::JMultipleFileScanner< Evt >, JSUPPORT::JMultipleFileScanner< JDAQSummaryslice >, JSUPPORT::JMultipleFileScanner< JHead_t >, JSUPPORT::JMultipleFileScanner< JTail_t >, JSUPPORT::JMultipleFileScanner< JTypeList< JDAQEvent, JNullType > >, JSUPPORT::JMultipleFileScanner< JTypeList< JHead_t, JTail_t > >, JSUPPORT::JMultipleFileScanner< KM3NETDAQ::JDAQEvent >, JSUPPORT::JMultipleFileScanner<>, JSUPPORT::JSingleFileScanner< T >, JSUPPORT::JSingleFileScanner< JHead_t >, JSUPPORT::JSingleFileScanner< JTail_t >, JSUPPORT::JSingleFileScanner< JTypeList< JHead_t, JTail_t > >, and JSUPPORT::JSingleFileScanner<>.

Definition at line 90 of file JObjectIterator.hh.

91 {
92 skip_type i = 0;
93
94 for ( ; i != ns && hasNext(); ++i) {
95 next();
96 }
97
98 return i;
99 }
virtual bool hasNext()=0
Check availability of next element.
virtual const pointer_type & next()=0
Get next element.
unsigned int skip_type
Type definition for number of objects to skip.

◆ Throw() [1/2]

static void JLANG::JThrow< JAccessible >::Throw ( const bool option)
inlinestaticinherited

Enable/disable throw option.

Parameters
optiontrue enable; false disable

Definition at line 37 of file JThrow.hh.

38 {
39 do_throw = option;
40 }

◆ Throw() [2/2]

static int JLANG::JThrow< JAccessible >::Throw ( const JException_t & error,
const int value = -1 )
inlinestaticinherited

Throw exception or return error.

Parameters
errorexception
valuereturn code
Returns
return code

Definition at line 51 of file JThrow.hh.

52 {
53 using namespace std;
54
55 if (do_throw) {
56 throw error;
57 }
58
59 cerr << error.what() << endl;
60
61 return value;
62 }

Member Data Documentation

◆ ps

template<class T >
pointer_type JLANG::JNullIterator< T >::ps
privateinherited

Definition at line 356 of file JObjectIterator.hh.

◆ do_throw

bool JLANG::JThrow< JAccessible >::do_throw
staticprotectedinherited

throw option

Set default throw option to true.

Definition at line 28 of file JThrow.hh.


The documentation for this class was generated from the following file: