Teuchos::basic_FancyOStream< CharT, Traits > Class Template Reference

std::ostream subclass that performs the magic of indenting data sent to an std::ostream object among other things. More...

#include <Teuchos_FancyOStream.hpp>

List of all members.

Public Types

Public types
typedef CharT char_type
 
typedef Traits traits_type
 
typedef traits_type::int_type int_type
 
typedef traits_type::pos_type pos_type
 
typedef traits_type::off_type off_type
 
typedef basic_FancyOStream_buf<
CharT, Traits > 
streambuf_t
 . .
typedef basic_ostream< char_type,
traits_type
ostream_t
 

Public Member Functions

Public client functions
 basic_FancyOStream (const RefCountPtr< std::basic_ostream< char_type, traits_type > > &oStream, const std::basic_string< char_type, traits_type > &tabIndentStr=" ", const int startingTab=0, const bool showLinePrefix=false, const int maxLenLinePrefix=10, const bool showTabCount=false, const bool showProcRank=false)
 
void initialize (const RefCountPtr< std::basic_ostream< char_type, traits_type > > &oStream, const std::basic_string< char_type, traits_type > &tabIndentStr=" ", const int startingTab=0, const bool showLinePrefix=false, const int maxLenLinePrefix=10, const bool showTabCount=false, const bool showProcRank=false)
 
RefCountPtr< std::basic_ostream<
char_type, traits_type > > 
getOStream ()
 
basic_FancyOStreamsetTabIndentStr (const std::basic_string< char_type, traits_type > &tabIndentStr)
 
const std::basic_string< char_type,
traits_type > & 
getTabIndentStr () const
 
basic_FancyOStreamsetShowAllFrontMatter (const bool showAllFrontMatter)
 Set if processor rank, line prefixes, and tab counts are shown or not .
basic_FancyOStreamsetShowLinePrefix (const bool showLinePrefix)
 
basic_FancyOStreamsetMaxLenLinePrefix (const int maxLenLinePrefix)
 
basic_FancyOStreamsetShowTabCount (const bool showTabCount)
 
basic_FancyOStreamsetShowProcRank (const bool showProcRank)
 
basic_FancyOStreamsetProcRankAndSize (const int procRank, const int numProcs)
 
basic_FancyOStreamsetOutputToRootOnly (const int rootRank)
 
int getOutputToRootOnly () const
 
void copyAllOutputOptions (const basic_FancyOStream< CharT, Traits > &oStream)
 
Functions designed to be used by basic_OSTab
void pushTab (const int tabs=1)
 
void popTab ()
 
void pushLinePrefix (const std::basic_string< char_type, traits_type > &linePrefix)
 
void popLinePrefix ()
 
const std::basic_string< char_type,
traits_type > & 
getTopLinePrefix () const
 
void pushDisableTabbing ()
 
void popDisableTabbing ()
 

Related Functions

(Note that these are not member functions.)

RefCountPtr< basic_FancyOStream<
CharT, Traits > > 
getFancyOStream (const RefCountPtr< std::basic_ostream< CharT, Traits > > &out)
 Get a FancyOStream from an std::ostream object.


Detailed Description

template<typename CharT, typename Traits = std::char_traits<CharT>>
class Teuchos::basic_FancyOStream< CharT, Traits >

std::ostream subclass that performs the magic of indenting data sent to an std::ostream object among other things.

Use the typedef FancyOStream for support for the char character type.

Indentation of the stream is accomplished through creating basic_OSTab objects.

In addition to indenting output, this stream object can also print various types of information at the beginning of each line. The type of information supported is:

See FancyOutputting_test.cpp for examples of how this class is used and the output it generates.

Definition at line 311 of file Teuchos_FancyOStream.hpp.


Member Typedef Documentation

template<typename CharT, typename Traits = std::char_traits<CharT>>
typedef CharT Teuchos::basic_FancyOStream< CharT, Traits >::char_type
 

Definition at line 319 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits = std::char_traits<CharT>>
typedef Traits Teuchos::basic_FancyOStream< CharT, Traits >::traits_type
 

Definition at line 321 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits = std::char_traits<CharT>>
typedef traits_type::int_type Teuchos::basic_FancyOStream< CharT, Traits >::int_type
 

Definition at line 323 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits = std::char_traits<CharT>>
typedef traits_type::pos_type Teuchos::basic_FancyOStream< CharT, Traits >::pos_type
 

Definition at line 325 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits = std::char_traits<CharT>>
typedef traits_type::off_type Teuchos::basic_FancyOStream< CharT, Traits >::off_type
 

Definition at line 327 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits = std::char_traits<CharT>>
typedef basic_FancyOStream_buf<CharT,Traits> Teuchos::basic_FancyOStream< CharT, Traits >::streambuf_t
 

. .

Definition at line 331 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits = std::char_traits<CharT>>
typedef basic_ostream<char_type, traits_type> Teuchos::basic_FancyOStream< CharT, Traits >::ostream_t
 

Definition at line 333 of file Teuchos_FancyOStream.hpp.


Constructor & Destructor Documentation

template<typename CharT, typename Traits>
Teuchos::basic_FancyOStream< CharT, Traits >::basic_FancyOStream const RefCountPtr< std::basic_ostream< char_type, traits_type > > &  oStream,
const std::basic_string< char_type, traits_type > &  tabIndentStr = "  ",
const int  startingTab = 0,
const bool  showLinePrefix = false,
const int  maxLenLinePrefix = 10,
const bool  showTabCount = false,
const bool  showProcRank = false
[explicit]
 

Definition at line 920 of file Teuchos_FancyOStream.hpp.


Member Function Documentation

template<typename CharT, typename Traits>
void Teuchos::basic_FancyOStream< CharT, Traits >::initialize const RefCountPtr< std::basic_ostream< char_type, traits_type > > &  oStream,
const std::basic_string< char_type, traits_type > &  tabIndentStr = "  ",
const int  startingTab = 0,
const bool  showLinePrefix = false,
const int  maxLenLinePrefix = 10,
const bool  showTabCount = false,
const bool  showProcRank = false
 

Definition at line 935 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
RefCountPtr< std::basic_ostream< CharT, Traits > > Teuchos::basic_FancyOStream< CharT, Traits >::getOStream  ) 
 

Definition at line 951 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
basic_FancyOStream< CharT, Traits > & Teuchos::basic_FancyOStream< CharT, Traits >::setTabIndentStr const std::basic_string< char_type, traits_type > &  tabIndentStr  ) 
 

Definition at line 958 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
const std::basic_string< CharT, Traits > & Teuchos::basic_FancyOStream< CharT, Traits >::getTabIndentStr  )  const
 

Definition at line 966 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
basic_FancyOStream< CharT, Traits > & Teuchos::basic_FancyOStream< CharT, Traits >::setShowAllFrontMatter const bool  showAllFrontMatter  ) 
 

Set if processor rank, line prefixes, and tab counts are shown or not .

Definition at line 973 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
basic_FancyOStream< CharT, Traits > & Teuchos::basic_FancyOStream< CharT, Traits >::setShowLinePrefix const bool  showLinePrefix  ) 
 

Definition at line 983 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
basic_FancyOStream< CharT, Traits > & Teuchos::basic_FancyOStream< CharT, Traits >::setMaxLenLinePrefix const int  maxLenLinePrefix  ) 
 

Definition at line 991 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
basic_FancyOStream< CharT, Traits > & Teuchos::basic_FancyOStream< CharT, Traits >::setShowTabCount const bool  showTabCount  ) 
 

Definition at line 999 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
basic_FancyOStream< CharT, Traits > & Teuchos::basic_FancyOStream< CharT, Traits >::setShowProcRank const bool  showProcRank  ) 
 

Definition at line 1007 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
basic_FancyOStream< CharT, Traits > & Teuchos::basic_FancyOStream< CharT, Traits >::setProcRankAndSize const int  procRank,
const int  numProcs
 

Definition at line 1015 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
basic_FancyOStream< CharT, Traits > & Teuchos::basic_FancyOStream< CharT, Traits >::setOutputToRootOnly const int  rootRank  ) 
 

Definition at line 1023 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
int Teuchos::basic_FancyOStream< CharT, Traits >::getOutputToRootOnly  )  const
 

Definition at line 1030 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
void Teuchos::basic_FancyOStream< CharT, Traits >::copyAllOutputOptions const basic_FancyOStream< CharT, Traits > &  oStream  ) 
 

Definition at line 1036 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
void Teuchos::basic_FancyOStream< CharT, Traits >::pushTab const int  tabs = 1  ) 
 

Definition at line 1048 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
void Teuchos::basic_FancyOStream< CharT, Traits >::popTab  ) 
 

Definition at line 1054 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
void Teuchos::basic_FancyOStream< CharT, Traits >::pushLinePrefix const std::basic_string< char_type, traits_type > &  linePrefix  ) 
 

Definition at line 1060 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
void Teuchos::basic_FancyOStream< CharT, Traits >::popLinePrefix  ) 
 

Definition at line 1066 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
const std::basic_string< CharT, Traits > & Teuchos::basic_FancyOStream< CharT, Traits >::getTopLinePrefix  )  const
 

Definition at line 1073 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
void Teuchos::basic_FancyOStream< CharT, Traits >::pushDisableTabbing  ) 
 

Definition at line 1079 of file Teuchos_FancyOStream.hpp.

template<typename CharT, typename Traits>
void Teuchos::basic_FancyOStream< CharT, Traits >::popDisableTabbing  ) 
 

Definition at line 1085 of file Teuchos_FancyOStream.hpp.


Friends And Related Function Documentation

template<typename CharT, typename Traits = std::char_traits<CharT>>
RefCountPtr< basic_FancyOStream< CharT, Traits > > getFancyOStream const RefCountPtr< std::basic_ostream< CharT, Traits > > &  out  )  [related]
 

Get a FancyOStream from an std::ostream object.

If the object already is a FancyOStream, then nothing has to be done. Otherwise, a temp FancyOStream is created for this purpose. If out.get()==NULL then return.get()==NULL on return also!

Definition at line 448 of file Teuchos_FancyOStream.hpp.


The documentation for this class was generated from the following file:
Generated on Thu Sep 18 12:30:32 2008 for Teuchos - Trilinos Tools Package by doxygen 1.3.9.1