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_ifstreamstream_
 
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 15 of file bstream_iterator.h.

15 : stream_(0) {}

◆ bistream_iterator() [2/2]

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

Definition at line 17 of file bstream_iterator.h.

17  : stream_(&s) {
18  read();
19  }

References bistream_iterator< T >::read().

Member Function Documentation

◆ operator!=()

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

Definition at line 37 of file bstream_iterator.h.

37  {
38  return !operator==(rhs);
39  }

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

◆ operator*()

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

Definition at line 21 of file bstream_iterator.h.

21 {return value_;}

References bistream_iterator< T >::value_.

◆ operator++() [1/2]

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

Definition at line 25 of file bstream_iterator.h.

25 {read(); return *this;}

References bistream_iterator< T >::read().

◆ operator++() [2/2]

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

Definition at line 27 of file bstream_iterator.h.

27  {
29  read();
30  return tmp;
31  }

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

◆ operator->()

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

Definition at line 23 of file bstream_iterator.h.

23 {return &value_;}

References bistream_iterator< T >::value_.

◆ operator==()

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

Definition at line 33 of file bstream_iterator.h.

33  {
34  return stream_ == rhs.stream_;
35  }

References bistream_iterator< T >::stream_.

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

◆ read()

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

Definition at line 46 of file bstream_iterator.h.

46  {
47  if (stream_ != 0) {
48  // if (!(*stream_ >> value_)) stream_ = 0;
49  if (!(*stream_ >> value_)) {
50  stream_ = 0;
51  // std::cout << "istream_iterator: stream turned bad, set stream_ to zero" << std::endl;
52  }
53  }
54  }

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++().

Member Data Documentation

◆ stream_

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

◆ value_

template<typename T >
T bistream_iterator< T >::value_
private
bistream_iterator::operator==
bool operator==(const bistream_iterator &rhs)
Definition: bstream_iterator.h:33
bistream_iterator::stream_
binary_ifstream * stream_
Definition: bstream_iterator.h:43
bistream_iterator::read
void read()
Definition: bstream_iterator.h:46
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
alignCSCRings.s
s
Definition: alignCSCRings.py:92
bistream_iterator::value_
T value_
Definition: bstream_iterator.h:44
bistream_iterator
Definition: bstream_iterator.h:10