|
|
| ~Stream () |
| | Empty destructor.
|
| |
| virtual bool_t | canRead () const =0 |
| | Checks whether the stream supports reading.
|
| |
| virtual bool_t | canSeek () const =0 |
| | Checks whether the stream supports seeking.
|
| |
| virtual bool_t | canWrite () const =0 |
| | Checks whether the stream supports writing.
|
| |
|
virtual void | close ()=0 |
| | Closes the stream.
|
| |
| virtual bool_t | isOpen () const =0 |
| | Checks whether the stream is open.
|
| |
| virtual bool_t | open ()=0 |
| | Opens the stream.
|
| |
| virtual int64_t | position () const =0 |
| | Returns the current position in the stream.
|
| |
| virtual bool_t | read (void *buffer, int32_t bufferSize, int32_t *totalRead)=0 |
| | Reads data from the stream.
|
| |
| int32_t | release () const |
| | The default implementation keeps a constant reference count of 1.
|
| |
| int32_t | retain () const |
| | The default implementation keeps a constant reference count of 1.
|
| |
| int32_t | retainCount () const |
| | The default implementation keeps a constant reference count of 1.
|
| |
| virtual bool_t | seek (int64_t position)=0 |
| | Seeks to the specified position in the stream.
|
| |
| virtual int64_t | size () const =0 |
| | Returns the current size of the stream.
|
| |
| virtual bool_t | write (const void *buffer, int32_t dataSize)=0 |
| | Writes data to the stream.
|
| |
| virtual int32_t | release () const =0 |
| | Releases the instance.
|
| |
| virtual int32_t | retain () const =0 |
| | Retains the instance.
|
| |
| virtual int32_t | retainCount () const =0 |
| | Returns the current reference count.
|
| |
The Stream interface can be used to implement a data source or sink.
It can be used as an alternative to files when it is not convenient or possible to use files.
The default implementation of primo::Reference keeps a constant reference count of 1. This can be used when the client code is the sole owner of the implemented stream and does not need to manage it through the primo::Reference interface.