diff options
author | Pixel <pixel@nobis-crew.org> | 2011-11-13 19:16:46 +0100 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-11-13 19:17:43 +0100 |
commit | 0edf1ac65db56054c80bc913a62172bbcebba321 (patch) | |
tree | 43001a25fb9e4fea22acffc395825d7ff04f2276 /src | |
parent | 1e6b5ff854b07dfd559795af8b9e775f58f4d6cd (diff) |
Adding isEOF() to Buffers (and cleaning code a tiny bit)
Diffstat (limited to 'src')
-rw-r--r-- | src/Buffer.cc | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/Buffer.cc b/src/Buffer.cc index d6ff9bb..e029df5 100644 --- a/src/Buffer.cc +++ b/src/Buffer.cc @@ -55,22 +55,9 @@ void Balau::Buffer::reset() { rseek(0); } -bool Balau::Buffer::isClosed() { - return false; -} - -const char * Balau::Buffer::getName() { - return "Buffer"; -} - -off_t Balau::Buffer::getSize() { - return m_bufSize; -} - -bool Balau::Buffer::canRead() { - return true; -} - -bool Balau::Buffer::canWrite() { - return true; -} +bool Balau::Buffer::isClosed() { return false; } +bool Balau::Buffer::isEOF() { return rtell() == m_bufSize; } +const char * Balau::Buffer::getName() { return "Buffer"; } +off_t Balau::Buffer::getSize() { return m_bufSize; } +bool Balau::Buffer::canRead() { return true; } +bool Balau::Buffer::canWrite() { return true; } |