www.mooseframework.org
Public Types | Public Member Functions | Private Attributes | List of all members
infix_ostream_iterator< T, charT, traits > Class Template Reference

#include <InfixIterator.h>

Inheritance diagram for infix_ostream_iterator< T, charT, traits >:
[legend]

Public Types

typedef charT char_type
 
typedef traits traits_type
 
typedef std::basic_ostream< charT, traits > ostream_type
 

Public Member Functions

 infix_ostream_iterator (ostream_type &s)
 
 infix_ostream_iterator (ostream_type &s, charT const *d, bool first=true)
 
infix_ostream_iterator< T, charT, traits > & operator= (T const &item)
 
infix_ostream_iterator< T, charT, traits > & operator* ()
 
infix_ostream_iterator< T, charT, traits > & operator++ ()
 
infix_ostream_iterator< T, charT, traits > & operator++ (int)
 

Private Attributes

std::basic_ostream< charT, traits > * os
 
charT const * delimiter
 
bool first_elem
 

Detailed Description

template<class T, class charT = char, class traits = std::char_traits<charT>>
class infix_ostream_iterator< T, charT, traits >

Definition at line 24 of file InfixIterator.h.

Member Typedef Documentation

template<class T, class charT = char, class traits = std::char_traits<charT>>
typedef charT infix_ostream_iterator< T, charT, traits >::char_type

Definition at line 32 of file InfixIterator.h.

template<class T, class charT = char, class traits = std::char_traits<charT>>
typedef std::basic_ostream<charT, traits> infix_ostream_iterator< T, charT, traits >::ostream_type

Definition at line 34 of file InfixIterator.h.

template<class T, class charT = char, class traits = std::char_traits<charT>>
typedef traits infix_ostream_iterator< T, charT, traits >::traits_type

Definition at line 33 of file InfixIterator.h.

Constructor & Destructor Documentation

template<class T, class charT = char, class traits = std::char_traits<charT>>
infix_ostream_iterator< T, charT, traits >::infix_ostream_iterator ( ostream_type s)
inline

Definition at line 35 of file InfixIterator.h.

35 : os(&s), delimiter(0), first_elem(true) {}
charT const * delimiter
Definition: InfixIterator.h:28
std::basic_ostream< charT, traits > * os
Definition: InfixIterator.h:27
template<class T, class charT = char, class traits = std::char_traits<charT>>
infix_ostream_iterator< T, charT, traits >::infix_ostream_iterator ( ostream_type s,
charT const *  d,
bool  first = true 
)
inline

Definition at line 36 of file InfixIterator.h.

37  : os(&s), delimiter(d), first_elem(first)
38  {
39  }
charT const * delimiter
Definition: InfixIterator.h:28
std::basic_ostream< charT, traits > * os
Definition: InfixIterator.h:27

Member Function Documentation

template<class T, class charT = char, class traits = std::char_traits<charT>>
infix_ostream_iterator<T, charT, traits>& infix_ostream_iterator< T, charT, traits >::operator* ( )
inline

Definition at line 50 of file InfixIterator.h.

50 { return *this; }
template<class T, class charT = char, class traits = std::char_traits<charT>>
infix_ostream_iterator<T, charT, traits>& infix_ostream_iterator< T, charT, traits >::operator++ ( )
inline

Definition at line 51 of file InfixIterator.h.

51 { return *this; }
template<class T, class charT = char, class traits = std::char_traits<charT>>
infix_ostream_iterator<T, charT, traits>& infix_ostream_iterator< T, charT, traits >::operator++ ( int  )
inline

Definition at line 52 of file InfixIterator.h.

52 { return *this; }
template<class T, class charT = char, class traits = std::char_traits<charT>>
infix_ostream_iterator<T, charT, traits>& infix_ostream_iterator< T, charT, traits >::operator= ( T const &  item)
inline

Definition at line 40 of file InfixIterator.h.

41  {
42  // Here's the only real change from ostream_iterator:
43  // Normally, the '*os << item;' would come before the 'if'.
44  if (!first_elem && delimiter != 0)
45  *os << delimiter;
46  *os << item;
47  first_elem = false;
48  return *this;
49  }
charT const * delimiter
Definition: InfixIterator.h:28
std::basic_ostream< charT, traits > * os
Definition: InfixIterator.h:27

Member Data Documentation

template<class T, class charT = char, class traits = std::char_traits<charT>>
charT const* infix_ostream_iterator< T, charT, traits >::delimiter
private
template<class T, class charT = char, class traits = std::char_traits<charT>>
bool infix_ostream_iterator< T, charT, traits >::first_elem
private

Definition at line 29 of file InfixIterator.h.

template<class T, class charT = char, class traits = std::char_traits<charT>>
std::basic_ostream<charT, traits>* infix_ostream_iterator< T, charT, traits >::os
private

Definition at line 27 of file InfixIterator.h.


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