diff options
Diffstat (limited to 'src/include/iodevice.h')
-rw-r--r-- | src/include/iodevice.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/include/iodevice.h b/src/include/iodevice.h index 73dd2ab..1612d3a 100644 --- a/src/include/iodevice.h +++ b/src/include/iodevice.h @@ -1,14 +1,15 @@ -/** -------------------------------------------------------------------- +/** * @file iodevice.h * @brief Declaration of the IODevice class. * @author Andreas Aardal Hanssen * @date 2002, 2003 - * ----------------------------------------------------------------- **/ + */ + #ifndef iodevice_h_included #define iodevice_h_included #include "convert.h" // BincStream -// #include <iostream> + #include <string> #include <unistd.h> // ::write @@ -143,7 +144,7 @@ namespace Binc { For instance, if the output level is set to 0, then "Hello" is written, and the output level is set to 1, followed by writing - "Daisy", the output level limit value will decive wether only + "Daisy", the output level limit value will decide whether only "Hello" is written, or if also "Daisy" is written. A low value of the level gives higher priority, and a high level @@ -233,7 +234,7 @@ namespace Binc { \param dest The incoming byte is stored in this char. */ - bool readChar(char *dest = 0); + bool readChar(char *dest = nullptr); /*! FIXME: add docs @@ -347,7 +348,6 @@ namespace Binc { int dumpfd; }; - //---------------------------------------------------------------------- template<class T> IODevice &IODevice::operator<<(const T &source) { if ((flags & IsEnabled) && outputLevel <= outputLevelLimit) { @@ -359,8 +359,9 @@ namespace Binc { ::write(dumpfd, ss.str().c_str(), ss.getSize()); } - if (flags & HasInputLimit) + if (flags & HasInputLimit) { if (outputBuffer.getSize() > maxOutputBufferSize) flush(); + } } return *this; |