CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
bistream_iterator< T > Class Template Reference

#include <bstream_iterator.h>

Inheritance diagram for bistream_iterator< T >:

Public Member Functions

 bistream_iterator ()
 
 bistream_iterator (binary_ifstream &s)
 
bool operator!= (const bistream_iterator &rhs)
 
const Toperator* () const
 
bistream_iteratoroperator++ ()
 
bistream_iteratoroperator++ (int)
 
const Toperator-> () const
 
bool operator== (const bistream_iterator &rhs)
 

Private Member Functions

void read ()
 

Private Attributes

binary_ifstream * stream_
 
T value_
 

Detailed Description

template<typename T>
class bistream_iterator< T >

Definition at line 10 of file bstream_iterator.h.

Constructor & Destructor Documentation

◆ bistream_iterator() [1/2]

template<typename T >
bistream_iterator< T >::bistream_iterator ( )
inline

Definition at line 12 of file bstream_iterator.h.

12 : stream_(0) {}
binary_ifstream * stream_

◆ bistream_iterator() [2/2]

template<typename T >
bistream_iterator< T >::bistream_iterator ( binary_ifstream &  s)
inline

Definition at line 14 of file bstream_iterator.h.

References bistream_iterator< T >::read().

14 : stream_(&s) { read(); }
binary_ifstream * stream_

Member Function Documentation

◆ operator!=()

template<typename T >
bool bistream_iterator< T >::operator!= ( const bistream_iterator< T > &  rhs)
inline

Definition at line 33 of file bstream_iterator.h.

References bistream_iterator< T >::operator==().

33 { return !operator==(rhs); }
bool operator==(const bistream_iterator &rhs)

◆ operator*()

template<typename T >
const T& bistream_iterator< T >::operator* ( void  ) const
inline

Definition at line 16 of file bstream_iterator.h.

References bistream_iterator< T >::value_.

16 { return value_; }

◆ operator++() [1/2]

template<typename T >
bistream_iterator& bistream_iterator< T >::operator++ ( void  )
inline

Definition at line 20 of file bstream_iterator.h.

References bistream_iterator< T >::read().

20  {
21  read();
22  return *this;
23  }

◆ operator++() [2/2]

template<typename T >
bistream_iterator& bistream_iterator< T >::operator++ ( int  )
inline

Definition at line 25 of file bstream_iterator.h.

References bistream_iterator< T >::read(), and createJobs::tmp.

25  {
27  read();
28  return tmp;
29  }
tmp
align.sh
Definition: createJobs.py:716

◆ operator->()

template<typename T >
const T* bistream_iterator< T >::operator-> ( ) const
inline

Definition at line 18 of file bstream_iterator.h.

References bistream_iterator< T >::value_.

18 { return &value_; }

◆ operator==()

template<typename T >
bool bistream_iterator< T >::operator== ( const bistream_iterator< T > &  rhs)
inline

Definition at line 31 of file bstream_iterator.h.

References bistream_iterator< T >::stream_.

Referenced by bistream_iterator< T >::operator!=().

31 { return stream_ == rhs.stream_; }
binary_ifstream * stream_

◆ read()

template<typename T >
void bistream_iterator< T >::read ( )
inlineprivate

Definition at line 39 of file bstream_iterator.h.

References bistream_iterator< T >::stream_, and bistream_iterator< T >::value_.

Referenced by bistream_iterator< T >::bistream_iterator(), edmIntegrityCheck.PublishToFileSystem::get(), and bistream_iterator< T >::operator++().

39  {
40  if (stream_ != 0) {
41  // if (!(*stream_ >> value_)) stream_ = 0;
42  if (!(*stream_ >> value_)) {
43  stream_ = 0;
44  // std::cout << "istream_iterator: stream turned bad, set stream_ to zero" << std::endl;
45  }
46  }
47  }
binary_ifstream * stream_

Member Data Documentation

◆ stream_

template<typename T >
binary_ifstream* bistream_iterator< T >::stream_
private

◆ value_

template<typename T >
T bistream_iterator< T >::value_
private