summaryrefslogtreecommitdiff
path: root/src/nullstream.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nullstream.h')
-rw-r--r--src/nullstream.h33
1 files changed, 22 insertions, 11 deletions
diff --git a/src/nullstream.h b/src/nullstream.h
index 8c1f744..9b75332 100644
--- a/src/nullstream.h
+++ b/src/nullstream.h
@@ -1,3 +1,10 @@
1/*
2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 *
4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE.
6 */
7
1#ifndef BU_NULL_STREAM_H 8#ifndef BU_NULL_STREAM_H
2#define BU_NULL_STREAM_H 9#define BU_NULL_STREAM_H
3 10
@@ -24,14 +31,14 @@ namespace Bu
24 virtual ~NullStream(); 31 virtual ~NullStream();
25 32
26 virtual void close(); 33 virtual void close();
27 virtual size_t read( void *pBuf, size_t nBytes ); 34 virtual Bu::size read( void *pBuf, Bu::size nBytes );
28 virtual Bu::String readLine(); 35 virtual Bu::String readLine();
29 virtual size_t write( const void *pBuf, size_t nBytes ); 36 virtual Bu::size write( const void *pBuf, Bu::size nBytes );
30 using Bu::Stream::write; 37 using Bu::Stream::write;
31 virtual long tell(); 38 virtual Bu::size tell();
32 virtual void seek( long offset ); 39 virtual void seek( Bu::size offset );
33 virtual void setPos( long pos ); 40 virtual void setPos( Bu::size pos );
34 virtual void setPosEnd( long pos ); 41 virtual void setPosEnd( Bu::size pos );
35 virtual bool isEos(); 42 virtual bool isEos();
36 virtual bool isOpen(); 43 virtual bool isOpen();
37 virtual void flush(); 44 virtual void flush();
@@ -42,14 +49,18 @@ namespace Bu
42 virtual bool isSeekable(); 49 virtual bool isSeekable();
43 virtual bool isBlocking(); 50 virtual bool isBlocking();
44 virtual void setBlocking( bool bBlocking=true ); 51 virtual void setBlocking( bool bBlocking=true );
45 virtual void setSize( long iSize ); 52 virtual void setSize( Bu::size iSize );
53
54 virtual size getSize() const;
55 virtual size getBlockSize() const;
56 virtual Bu::String getLocation() const;
46 57
47 size_t getBytesRead() { return sRead; } 58 Bu::size getBytesRead() { return sRead; }
48 size_t getByetsWritten() { return sWrote; } 59 Bu::size getByetsWritten() { return sWrote; }
49 60
50 private: 61 private:
51 size_t sRead; 62 Bu::size sRead;
52 size_t sWrote; 63 Bu::size sWrote;
53 }; 64 };
54}; 65};
55 66