aboutsummaryrefslogtreecommitdiff
path: root/src/membuf.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-01-20 18:09:04 +0000
committerMike Buland <eichlan@xagasoft.com>2011-01-20 18:09:04 +0000
commit393f1b414746a7f1977971dd7659dd2b47092b11 (patch)
tree81d0ca1ee70ab86a7d79c1991abe5c387b655fb2 /src/membuf.h
parentc259f95bd0e58b247940a339bb9b4b401b4e9438 (diff)
parent7e25a863325dc3e9762397e700030969e093b087 (diff)
downloadlibbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.gz
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.bz2
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.xz
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.zip
Wow! Merged the branch, streams are updated, and there's no more FString, run
the fixstrings.sh script in the support directory to (hopefully) automatically update your projects.
Diffstat (limited to '')
-rw-r--r--src/membuf.h32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/membuf.h b/src/membuf.h
index 9e406c1..d98a29c 100644
--- a/src/membuf.h
+++ b/src/membuf.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2007-2010 Xagasoft, All rights reserved. 2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 * 3 *
4 * This file is part of the libbu++ library and is released under the 4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE. 5 * terms of the license contained in the file LICENSE.
@@ -10,8 +10,9 @@
10 10
11#include <stdint.h> 11#include <stdint.h>
12 12
13#include "bu/config.h"
13#include "bu/stream.h" 14#include "bu/stream.h"
14#include "bu/fstring.h" 15#include "bu/string.h"
15 16
16namespace Bu 17namespace Bu
17{ 18{
@@ -23,18 +24,18 @@ namespace Bu
23 { 24 {
24 public: 25 public:
25 MemBuf(); 26 MemBuf();
26 MemBuf( const Bu::FString &str ); 27 MemBuf( const Bu::String &str );
27 virtual ~MemBuf(); 28 virtual ~MemBuf();
28 29
29 virtual void close(); 30 virtual void close();
30 virtual size_t read( void *pBuf, size_t nBytes ); 31 virtual size read( void *pBuf, size iBytes );
31 32
32 virtual size_t write( const void *pBuf, size_t nBytes ); 33 virtual size write( const void *pBuf, size iBytes );
33 using Stream::write; 34 using Stream::write;
34 virtual long tell(); 35 virtual size tell();
35 virtual void seek( long offset ); 36 virtual void seek( size offset );
36 virtual void setPos( long pos ); 37 virtual void setPos( size pos );
37 virtual void setPosEnd( long pos ); 38 virtual void setPosEnd( size pos );
38 virtual bool isEos(); 39 virtual bool isEos();
39 virtual bool isOpen(); 40 virtual bool isOpen();
40 virtual void flush(); 41 virtual void flush();
@@ -45,14 +46,17 @@ namespace Bu
45 virtual bool isSeekable(); 46 virtual bool isSeekable();
46 virtual bool isBlocking(); 47 virtual bool isBlocking();
47 virtual void setBlocking( bool bBlocking=true ); 48 virtual void setBlocking( bool bBlocking=true );
48 virtual void setSize( long iSize ); 49 virtual void setSize( size iSize );
50 virtual size getSize() const;
51 virtual size getBlockSize() const;
52 virtual Bu::String getLocation() const;
49 53
50 Bu::FString &getString(); 54 Bu::String &getString();
51 void setString( const Bu::FString &sNewData ); 55 void setString( const Bu::String &sNewData );
52 56
53 private: 57 private:
54 Bu::FString sBuf; 58 Bu::String sBuf;
55 long nPos; 59 size nPos;
56 }; 60 };
57} 61}
58 62