Class TempLat::ConditionalStream
ClassList > TempLat > ConditionalStream
Because of MPI, we often only want to stream if we are root, etc. To simplify the notation, and simply always be able to write output << ..., we create a wrapper that accepts input with operator<<, and does the 'if'-ing inside that operator. More...
#include <conditionalstream.h>
Inherited by the following classes: TempLat::ConditionalFileStream
Public Functions
| Type | Name |
|---|---|
| ConditionalStream (std::ostream & stream_, bool enabled_) |
|
| void | Disable () |
| void | Enable () |
| ConditionalStream & | operator<< (const T & t) |
Detailed Description
https://stackoverflow.com/a/7694321/2295722 Unit test: ctest -R test-conditionalstream
Public Functions Documentation
function ConditionalStream
function Disable
function Enable
function operator<<
template<typename T>
inline ConditionalStream & TempLat::ConditionalStream::operator<< (
const T & t
)
The documentation for this class was generated from the following file cosmolatticeweb/tmp/code_source/templat/include/TempLat/util/conditionaloutput/conditionalstream.h