$extrastylesheet
libMesh::BasicOStreamProxy< charT, traits > Class Template Reference

#include <ostream_proxy.h>

List of all members.

Public Types

typedef std::basic_ostream
< charT, traits > 
streamT
typedef std::basic_streambuf
< charT, traits > 
streambufT

Public Member Functions

 BasicOStreamProxy (streamT &target)
 BasicOStreamProxy (BasicOStreamProxy &old)
BasicOStreamProxyoperator= (streamT &target)
BasicOStreamProxyoperator= (const BasicOStreamProxy &old)
 ~BasicOStreamProxy ()
 operator streamT & ()
 operator const streamT & () const
template<typename T >
BasicOStreamProxyoperator<< (const T &in)
BasicOStreamProxyoperator<< (streamT &(*in)(streamT &))
BasicOStreamProxyoperator<< (std::basic_ios< charT, traits > &(*in)(std::basic_ios< charT, traits > &))
BasicOStreamProxyoperator<< (std::ios_base &(*in)(std::ios_base &))
streambufTrdbuf () const
streambufTrdbuf (streambufT *sb)
BasicOStreamProxyflush ()
std::ios_base::fmtflags flags () const
std::ios_base::fmtflags flags (std::ios_base::fmtflags fmtfl)
std::ios_base::fmtflags setf (std::ios_base::fmtflags fmtfl)
std::ios_base::fmtflags setf (std::ios_base::fmtflags fmtfl, std::ios_base::fmtflags mask)
void unsetf (std::ios_base::fmtflags mask)
std::streamsize precision () const
std::streamsize precision (std::streamsize prec)
void reset (streamT &target)
streamTget ()
const streamTget () const

Private Attributes

streamT_target

Detailed Description

template<typename charT = char, typename traits = std::char_traits<charT>>
class libMesh::BasicOStreamProxy< charT, traits >

Definition at line 50 of file ostream_proxy.h.


Member Typedef Documentation

template<typename charT = char, typename traits = std::char_traits<charT>>
typedef std::basic_streambuf<charT,traits> libMesh::BasicOStreamProxy< charT, traits >::streambufT

This class is going to be used to proxy for ostream, but other character and traits types are possible

Definition at line 63 of file ostream_proxy.h.

template<typename charT = char, typename traits = std::char_traits<charT>>
typedef std::basic_ostream<charT,traits> libMesh::BasicOStreamProxy< charT, traits >::streamT

This class is going to be used to proxy for ostream, but other character and traits types are possible

Definition at line 57 of file ostream_proxy.h.


Constructor & Destructor Documentation

template<typename charT = char, typename traits = std::char_traits<charT>>
libMesh::BasicOStreamProxy< charT, traits >::BasicOStreamProxy ( streamT target) [inline]

Default constructor. Takes a reference to the target ostream to which we pass output. The user is responsible for ensuring that this target exists for as long as the proxy does.

Definition at line 70 of file ostream_proxy.h.

: _target(&target) {}
template<typename charT = char, typename traits = std::char_traits<charT>>
libMesh::BasicOStreamProxy< charT, traits >::BasicOStreamProxy ( BasicOStreamProxy< charT, traits > &  old) [inline]

Shallow copy constructor. Output in the new object is passed to the same target ostream as in the old object. The user is responsible for ensuring that this target exists for as long as the proxies do.

Definition at line 78 of file ostream_proxy.h.

: _target(old._target) {}
template<typename charT = char, typename traits = std::char_traits<charT>>
libMesh::BasicOStreamProxy< charT, traits >::~BasicOStreamProxy ( ) [inline]

Default destructor.

Definition at line 101 of file ostream_proxy.h.

{}

Member Function Documentation

template<typename charT = char, typename traits = std::char_traits<charT>>
std::ios_base::fmtflags libMesh::BasicOStreamProxy< charT, traits >::flags ( ) const [inline]

Get the associated format flags

Definition at line 166 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

  { return _target->flags(); }
template<typename charT = char, typename traits = std::char_traits<charT>>
std::ios_base::fmtflags libMesh::BasicOStreamProxy< charT, traits >::flags ( std::ios_base::fmtflags  fmtfl) [inline]

Set/get the associated format flags

Definition at line 172 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

  { return _target->flags(fmtfl); }
template<typename charT = char, typename traits = std::char_traits<charT>>
BasicOStreamProxy& libMesh::BasicOStreamProxy< charT, traits >::flush ( ) [inline]

Flush the associated stream buffer

Definition at line 161 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

Referenced by libMesh::PltLoader::read_data().

{ _target->flush(); return *this; }
template<typename charT = char, typename traits = std::char_traits<charT>>
streamT* libMesh::BasicOStreamProxy< charT, traits >::get ( ) [inline]

Rather than implement every ostream/ios/ios_base function, we'll be lazy and make esoteric uses go through a get() function.

Definition at line 220 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

Referenced by libMesh::LibMeshInit::~LibMeshInit().

                 {
    return _target;
  }
template<typename charT = char, typename traits = std::char_traits<charT>>
const streamT* libMesh::BasicOStreamProxy< charT, traits >::get ( ) const [inline]

Rather than implement every ostream/ios/ios_base function, we'll be lazy and make esoteric uses go through a get() function.

Definition at line 228 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

                             {
    return _target;
  }
template<typename charT = char, typename traits = std::char_traits<charT>>
libMesh::BasicOStreamProxy< charT, traits >::operator const streamT & ( ) const [inline]

Conversion to const ostream&, for when we get passed to a function requesting one.

Definition at line 117 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

{ return *_target; }
template<typename charT = char, typename traits = std::char_traits<charT>>
libMesh::BasicOStreamProxy< charT, traits >::operator streamT & ( ) [inline]

Conversion to ostream&, for when we get passed to a function requesting one.

Definition at line 111 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

{ return *_target; }
template<typename charT = char, typename traits = std::char_traits<charT>>
template<typename T >
BasicOStreamProxy& libMesh::BasicOStreamProxy< charT, traits >::operator<< ( const T &  in) [inline]

Redirect any output to the target.

Definition at line 123 of file ostream_proxy.h.

                                              {
    (*_target) << in; return *this;
  }
template<typename charT = char, typename traits = std::char_traits<charT>>
BasicOStreamProxy& libMesh::BasicOStreamProxy< charT, traits >::operator<< ( streamT &(*)(streamT &)  in) [inline]

Redirect any ostream manipulators to the target.

Definition at line 130 of file ostream_proxy.h.

                                                           {
    (*_target) << in; return *this;
  }
template<typename charT = char, typename traits = std::char_traits<charT>>
BasicOStreamProxy& libMesh::BasicOStreamProxy< charT, traits >::operator<< ( std::basic_ios< charT, traits > &(*)(std::basic_ios< charT, traits > &)  in) [inline]

Redirect any ios manipulators to the target.

Definition at line 137 of file ostream_proxy.h.

                                                                                                 {
    (*_target) << in; return *this;
  }
template<typename charT = char, typename traits = std::char_traits<charT>>
BasicOStreamProxy& libMesh::BasicOStreamProxy< charT, traits >::operator<< ( std::ios_base &(*)(std::ios_base &)  in) [inline]

Redirect any ios_base manipulators to the target.

Definition at line 144 of file ostream_proxy.h.

                                                                   {
    (*_target) << in; return *this;
  }
template<typename charT = char, typename traits = std::char_traits<charT>>
BasicOStreamProxy& libMesh::BasicOStreamProxy< charT, traits >::operator= ( streamT target) [inline]

Reset the internal target to a new target output stream.

Definition at line 83 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

  {
    _target = &target;
    return *this;
  }
template<typename charT = char, typename traits = std::char_traits<charT>>
BasicOStreamProxy& libMesh::BasicOStreamProxy< charT, traits >::operator= ( const BasicOStreamProxy< charT, traits > &  old) [inline]

Reset the target to the same output stream as in old

Definition at line 92 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

  {
    _target = old._target;
    return *this;
  }
template<typename charT = char, typename traits = std::char_traits<charT>>
std::streamsize libMesh::BasicOStreamProxy< charT, traits >::precision ( ) const [inline]
template<typename charT = char, typename traits = std::char_traits<charT>>
std::streamsize libMesh::BasicOStreamProxy< charT, traits >::precision ( std::streamsize  prec) [inline]

Set the associated write precision

Definition at line 203 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

  { return _target->precision(prec); }
template<typename charT = char, typename traits = std::char_traits<charT>>
streambufT* libMesh::BasicOStreamProxy< charT, traits >::rdbuf ( ) const [inline]

Get the associated stream buffer

Definition at line 151 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

Referenced by libMesh::LibMeshInit::LibMeshInit(), and libMesh::LibMeshInit::~LibMeshInit().

{ return _target->rdbuf(); }
template<typename charT = char, typename traits = std::char_traits<charT>>
streambufT* libMesh::BasicOStreamProxy< charT, traits >::rdbuf ( streambufT sb) [inline]

Set the associated stream buffer

Definition at line 156 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

{ return _target->rdbuf(sb); }
template<typename charT = char, typename traits = std::char_traits<charT>>
void libMesh::BasicOStreamProxy< charT, traits >::reset ( streamT target) [inline]

Reset the proxy to point to a different target. Note that this does not delete the previous target.

Definition at line 214 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

Referenced by libMesh::LibMeshInit::~LibMeshInit().

{ _target = &target; }
template<typename charT = char, typename traits = std::char_traits<charT>>
std::ios_base::fmtflags libMesh::BasicOStreamProxy< charT, traits >::setf ( std::ios_base::fmtflags  fmtfl) [inline]

Set the associated flags

Definition at line 178 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

Referenced by libMesh::ContinuationSystem::continuation_solve(), and libMesh::ContinuationSystem::update_solution().

  { return _target->setf(fmtfl); }
template<typename charT = char, typename traits = std::char_traits<charT>>
std::ios_base::fmtflags libMesh::BasicOStreamProxy< charT, traits >::setf ( std::ios_base::fmtflags  fmtfl,
std::ios_base::fmtflags  mask 
) [inline]

Set the associated flags

Definition at line 184 of file ostream_proxy.h.

References libMesh::BasicOStreamProxy< charT, traits >::_target.

  { return _target->setf(fmtfl, mask); }
template<typename charT = char, typename traits = std::char_traits<charT>>
void libMesh::BasicOStreamProxy< charT, traits >::unsetf ( std::ios_base::fmtflags  mask) [inline]

Member Data Documentation


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