NCBI C++ ToolKit
|
Search Toolkit Book for CMultiWriter
IWriter which can write simultaneously to the different streams. More...
#include <util/multi_writer.hpp>
Public Member Functions | |
CMultiWriter (const list< CNcbiOstream * > &streams) | |
virtual | ~CMultiWriter () |
virtual ERW_Result | Write (const void *buf, size_t count, size_t *bytes_written=0) |
Write up to "count" bytes from the buffer pointed to by the "buf" argument onto the output device. More... | |
virtual ERW_Result | Flush (void) |
Flush pending data (if any) down to the output device. More... | |
Public Member Functions inherited from IWriter | |
virtual | ~IWriter () |
Private Member Functions | |
CMultiWriter (const CMultiWriter &) | |
CMultiWriter & | operator= (CMultiWriter &) |
Private Attributes | |
list< CNcbiOstream * > | m_Dest |
IWriter which can write simultaneously to the different streams.
Definition at line 46 of file multi_writer.hpp.
|
explicit |
Definition at line 37 of file multi_writer.cpp.
|
virtual |
Definition at line 43 of file multi_writer.cpp.
|
private |
|
virtual |
Flush pending data (if any) down to the output device.
Implements IWriter.
Definition at line 59 of file multi_writer.cpp.
References eRW_Success, m_Dest, and NON_CONST_ITERATE.
|
private |
|
virtual |
Write up to "count" bytes from the buffer pointed to by the "buf" argument onto the output device.
Always store the number of bytes actually written, or 0 if "count" has been passed as 0 ("buf" must be ignored in this case), via the "bytes_written" pointer, if provided non-NULL. Note that the method can return non-eRW_Success in case of an I/O error along with indicating (some) data delivered to the output device (and reflected in "*bytes_written").
Implements IWriter.
Definition at line 48 of file multi_writer.cpp.
References buf, count, eRW_Success, m_Dest, and NON_CONST_ITERATE.
|
private |
Definition at line 63 of file multi_writer.hpp.