This class allows directing of textual output to multiple devices. More...
#include <TestStream.h>
Public Member Functions | |
TestStream (std::fstream *in_pOutFile=0, std::fstream *in_pRptFile=0) | |
void | SetMode (unsigned char in_newMode) |
void | ResetMode (void) |
unsigned char | GetMode (void) |
Get current output mode. | |
void | SetStreamActivation (unsigned char in_streamsToActivate) |
unsigned char | GetStreamActivation (void) |
Get current sream activation status. | |
int | width (int in_newWidth) |
Returns field width in characters. See ios::width() (C++ standard). | |
int | width (void) const |
long | setf (long in_flags) |
Set TStream format flags. See ios::setf(). | |
long | setf (long in_flags, long in_mask) |
long | unsetf (long in_flags) |
TestStream & | TestStream::operator<< (std::string in_item) |
TestStream & | TestStream::operator<< (unsigned char *in_item) |
TestStream & | TestStream::operator<< (const char *in_item) |
TestStream & | TestStream::operator<< (char in_item) |
TestStream & | TestStream::operator<< (unsigned char in_item) |
TestStream & | TestStream::operator<< (short in_item) |
TestStream & | TestStream::operator<< (unsigned short in_item) |
TestStream & | TestStream::operator<< (int in_item) |
TestStream & | TestStream::operator<< (unsigned int in_item) |
TestStream & | TestStream::operator<< (long in_item) |
TestStream & | TestStream::operator<< (unsigned long in_item) |
TestStream & | TestStream::operator<< (float in_item) |
TestStream & | TestStream::operator<< (double in_item) |
TestStream & | TestStream::operator<< (long double in_item) |
TestStream & | operator<< (std::ostream &(*f)(std::ostream &)) |
TestStream & | operator<< (std::ios &(*f)(std::ios &)) |
TestStream & | write (const signed char *in_pCh, int in_count) |
TestStream & | write (const unsigned char *in_pCh, int in_count) |
TestStream & | write (const char *in_pCh, int in_count) |
This class allows directing of textual output to multiple devices.
Definition of the class TestStream which performs handling of test output. With this class it is possible to direct test output to standard out, to protocol and report file. With calling member function setMode any of the output devices can be switched on or off.
TestToolBox::TestStream::TestStream | ( | std::fstream * | in_pOutFile = 0 , |
|
std::fstream * | in_pRptFile = 0 | |||
) |
Constructs an object of class TestStream. The given parameters point to the streams to be used for output. A null pointer means that this device is not available.
void TestToolBox::TestStream::SetMode | ( | unsigned char | in_newMode | ) |
Selects streams for output. Possible values for mode are M_NULL, M_STDOUT, M_OUTFILE, M_RPTFILE. To select more than one device use | operator.
void TestToolBox::TestStream::ResetMode | ( | void | ) |
Reset mode to default (i.e. all available output devices are selected).
void TestToolBox::TestStream::SetStreamActivation | ( | unsigned char | in_streamsToActivate | ) |
Completely activate the streams via bit mask Streams not contained within bitmask will be switched off completely
TestStream& TestToolBox::TestStream::TestStream::operator<< | ( | std::string | in_item | ) |
Insert arguments in TestStream. The output operator << is defined and overloaded similar to ostream.
TestStream& TestToolBox::TestStream::operator<< | ( | std::ostream &(*)(std::ostream &) | f | ) |
The overloaded operator << accepts ostream (ios) manipulators.
TestStream& TestToolBox::TestStream::write | ( | const signed char * | in_pCh, | |
int | in_count | |||
) |
Write the contents of a buffer like ostream::write() The only difference is that the output is directed to several devices according to mode value.