Cout/cerr related


Functions

void libthrowable::init (const std::ostream *p_cout=&std::cout, const std::ostream *p_cerr=&std::cerr) throw ()
 Informs the library about std::cout and std::cerr as you see them - or about your own equivalent objects.
void libthrowable::registerAsStreamsToStdout (const std::vector< const std::ostream * > &streams, bool append=true) throw ()
 Informs the library that the given streams write to stdout.
void libthrowable::registerAsStreamToStdout (const std::ostream *stream, bool append=true) throw ()
 Convenience function.
void libthrowable::registerAsStreamsToStderr (const std::vector< const std::ostream * > &streams, bool append=true) throw ()
 Informs the library that the given streams write to stderr.
void libthrowable::registerAsStreamToSterr (const std::ostream *stream, bool append=true) throw ()
 Convenience function.

Function Documentation

void libthrowable::init ( const std::ostream *  p_cout = &std::cout,
const std::ostream *  p_cerr = &std::cerr 
) throw ()

Informs the library about std::cout and std::cerr as you see them - or about your own equivalent objects.

Attention:
If both libthrowable and your application is dynamically linked against the same version of the C++ standard library, then the address of cout/cerr will be the same for both you and the library and you can safely omit to call this routine. However, if this is not the case, these addresses will differ and operator<<(std::ostream&, const Throwable&) will not work as expected unless you inform the library about your cout/cerr by calling this routine. In the case you are using your own, selfcrafted stream objects instead of cout and cerr you can of course also pass them to this function, but should at least also take a look at the more advanced API in this section.
Parameters:
[in] p_cout A pointer to the ostream object you use for writing to stdout.
[in] p_cerr A pointer to the ostream object you use for writing to stderr.
Since:
libthrowable-1.1.0
See also:
registerAsStreamsToStdout(const std::vector<const std::ostream*>&, bool)

registerAsStreamsToStderr(const std::vector<const std::ostream*>&, bool)

void libthrowable::registerAsStreamsToStderr ( const std::vector< const std::ostream * > &  streams,
bool  append = true 
) throw ()

Informs the library that the given streams write to stderr.

Parameters:
[in] streams The streams you want to register.
[in] append Set to false iff you want to remove the effect of all prior calls.
Note:
"cerr" as the library sees it (and this may be a different "cerr" from the one that you see) will always be registered, regardless what you do here.
Since:
libthrowable-1.1.0
See also:
registerAsStreamToSterr(const std::ostream*, bool)

init(const std::ostream*, const std::ostream*)

void libthrowable::registerAsStreamsToStdout ( const std::vector< const std::ostream * > &  streams,
bool  append = true 
) throw ()

Informs the library that the given streams write to stdout.

Parameters:
[in] streams The streams you want to register.
[in] append Set to false iff you want to remove the effect of all prior calls.
Note:
"cout" as the library sees it (and this may be a different "cout" from the one that you see) will always be registered, regardless what you do here.
Since:
libthrowable-1.1.0
See also:
registerAsStreamToStdout(const std::ostream*, bool)

init(const std::ostream*, const std::ostream*)

void libthrowable::registerAsStreamToStdout ( const std::ostream *  stream,
bool  append = true 
) throw ()

Convenience function.

Since:
libthrowable-1.1.0
See also:
registerAsStreamsToStdout(const std::vector<const std::ostream*>&, bool)

void libthrowable::registerAsStreamToSterr ( const std::ostream *  stream,
bool  append = true 
) throw ()

Convenience function.

Since:
libthrowable-1.1.0
See also:
registerAsStreamsToStderr(const std::vector<const std::ostream*>&, bool)


Generated on Wed Jan 9 18:07:17 2008 for libthrowable by  doxygen 1.5.4  Hosted on  SourceForge.net Logo