aboutsummaryrefslogtreecommitdiff
path: root/src/unstable/myriadstream.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-03-25 20:00:08 +0000
committerMike Buland <eichlan@xagasoft.com>2012-03-25 20:00:08 +0000
commit469bbcf0701e1eb8a6670c23145b0da87357e178 (patch)
treeb5b062a16e46a6c5d3410b4e574cd0cc09057211 /src/unstable/myriadstream.h
parentee1b79396076edc4e30aefb285fada03bb45e80d (diff)
downloadlibbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.gz
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.bz2
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.tar.xz
libbu++-469bbcf0701e1eb8a6670c23145b0da87357e178.zip
Code is all reorganized. We're about ready to release. I should write up a
little explenation of the arrangement.
Diffstat (limited to 'src/unstable/myriadstream.h')
-rw-r--r--src/unstable/myriadstream.h61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/unstable/myriadstream.h b/src/unstable/myriadstream.h
new file mode 100644
index 0000000..fdad669
--- /dev/null
+++ b/src/unstable/myriadstream.h
@@ -0,0 +1,61 @@
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
8#ifndef BU_MYRIAD_STREAM_H
9#define BU_MYRIAD_STREAM_H
10
11#include "bu/stream.h"
12#include "bu/myriad.h"
13
14namespace Bu
15{
16 class MyriadStream : public Bu::Stream
17 {
18 friend class Myriad;
19 private:
20 /**
21 * These can only be created by the Myriad class.
22 */
23 MyriadStream( Myriad &rMyriad, Myriad::Stream *pStream );
24
25 public:
26 virtual ~MyriadStream();
27
28 virtual void close();
29 virtual Bu::size read( void *pBuf, Bu::size nBytes );
30 virtual Bu::size write( const void *pBuf, Bu::size nBytes );
31 using Stream::write;
32 virtual Bu::size tell();
33 virtual void seek( Bu::size offset );
34 virtual void setPos( Bu::size pos );
35 virtual void setPosEnd( Bu::size pos );
36 virtual bool isEos();
37 virtual bool isOpen();
38 virtual void flush();
39 virtual bool canRead();
40 virtual bool canWrite();
41 virtual bool isReadable();
42 virtual bool isWritable();
43 virtual bool isSeekable();
44 virtual bool isBlocking();
45 virtual void setBlocking( bool bBlocking=true );
46 virtual void setSize( Bu::size iSize );
47
48 virtual size getSize() const;
49 virtual size getBlockSize() const;
50 virtual Bu::String getLocation() const;
51
52 private:
53 Myriad &rMyriad;
54 Myriad::Stream *pStream;
55 Myriad::Block *pCurBlock;
56 int iBlockSize;
57 int iPos;
58 };
59};
60
61#endif