changeset 56:892f7a4277d0

[examples] added missing namespace specifications for some streamsize
author Zoltan K.
date Tue, 30 Mar 2010 00:07:44 +0000
parents 3b8469fa0fd7
children 774cd733e664
files examples/Buffer/Buffer.cpp examples/Buffer/Buffer.hpp
diffstat 2 files changed, 2 insertions(+), 58 deletions(-) [+]
line wrap: on
line diff
--- a/examples/Buffer/Buffer.cpp	Sun Mar 28 17:35:33 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-#include <iostream>
-
-#include "Buffer.hpp"
-
-StreamBufferImpl::StreamBufferImpl(void)
-    : _buffer(NULL),
-      _size(0)
-{
-}
-
-StreamBufferImpl *      StreamBufferImpl::setbuf(char *, std::streamsize)
-{
-    if (s != NULL)
-    {
-        /*
-         * We set the get pointer.
-         * s is the beginning of the get sequence.
-         * s is also the current position of the get pointer.
-         * s + n is a pointer to the end of the get sequence.
-         */
-        this->setg(s, s, s + n);
-
-        /*
-         * We set the put pointer.
-         * s is the beginning of the put sequence.
-         * s + n is a pointer to the end of the put sequence.
-         */
-        this->setp(s, s + n);
-    }
-    return (*this);
-}
-
-virtual std::streampos  seekoff(std::streamoff off,
-                                std::ios_base::seekdir way,
-                                std::ios_base::openmode which = std::ios_base::in | std::ios_base::out)
-{
-    if (off != 0)
-    {
-    }
-
-    if ((which == std::ios_base::in | std::ios_base::out)
-        || (which == std::ios_base::in))
-        return (this->gptr() - this->eback());
-
-    return (this->pptr() - this->pbase());
-}
-
-int	StreamBufferImpl::sync(void)
-{
-    return (0);
-}
-
-int     StreamBufferImpl::underflow(void)
-{
-    return (EOF);
-}
--- a/examples/Buffer/Buffer.hpp	Sun Mar 28 17:35:33 2010 +0200
+++ b/examples/Buffer/Buffer.hpp	Tue Mar 30 00:07:44 2010 +0000
@@ -119,7 +119,7 @@
      *
      * @return The number of characters stored.
      */
-    virtual std::streamsize     xsgetn(char * s, streamsize n);
+    virtual std::streamsize     xsgetn(char * s, std::streamsize n);
 
     /**
      * @brief Called when there is a need to read data from the buffer but
@@ -168,7 +168,7 @@
      *
      * @return The number of characters written to the buffer.
      */
-    virtual streamsize  xsputn(const char * s, streamsize n);
+    virtual std::streamsize  xsputn(const char * s, std::streamsize n);
 
     /**
      * @brief Called when there is no more available space on the buffer. This