Jpp  17.1.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Attributes | List of all members
JLANG::JNullIterator< T > Struct Template Reference

Implementation for null iteration. More...

#include <JObjectIterator.hh>

Inheritance diagram for JLANG::JNullIterator< T >:
JLANG::JObjectIterator< T > JSUPPORT::JDAQFileReader< T, false > JSUPPORT::JMonteCarloASCIIFileReader< T > JSUPPORT::JMonteCarloGZFileReader< T >

Public Types

typedef JObjectIterator< T >
::pointer_type 
pointer_type
 

Public Member Functions

virtual bool hasNext ()
 Check availability of next element. More...
 
virtual const pointer_typenext ()
 Get next element. More...
 
virtual skip_type skip (const skip_type ns)
 Skip items. More...
 

Private Attributes

pointer_type ps
 

Detailed Description

template<class T>
struct JLANG::JNullIterator< T >

Implementation for null iteration.

Definition at line 327 of file JObjectIterator.hh.

Member Typedef Documentation

Definition at line 331 of file JObjectIterator.hh.

Member Function Documentation

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

Check availability of next element.

Returns
false

Implements JLANG::JObjectIterator< T >.

Definition at line 339 of file JObjectIterator.hh.

340  {
341  return false;
342  }
template<class T >
virtual const pointer_type& JLANG::JNullIterator< T >::next ( )
inlinevirtual

Get next element.

Returns
NULL

Implements JLANG::JObjectIterator< T >.

Definition at line 350 of file JObjectIterator.hh.

351  {
352  return ps;
353  }
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::JPipe< T >, JLANG::JPipe< JTail_t >, JLANG::JPipe< JHead_t >, JLANG::JSTDObjectIterator< T >, JLANG::JAbstractObjectReader< T >, JLANG::JAbstractObjectReader< JNullType >, JLANG::JAbstractObjectReader< const T >, JLANG::JAbstractObjectReader< JTail_t >, JLANG::JAbstractObjectReader< JHead_t >, JLANG::JAbstractObjectReader< KM3NETDAQ::KM3NETDAQ::JDAQEvent >, and JLANG::JAbstractObjectReader< JDAQSummaryslice >.

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  }
unsigned int skip_type
Type definition for number of objects to skip.
virtual const pointer_type & next()=0
Get next element.
virtual bool hasNext()=0
Check availability of next element.

Member Data Documentation

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

Definition at line 356 of file JObjectIterator.hh.


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