#include <cgul_block_reader_cxx.h>
Public Member Functions | |
virtual | ~cgul_block_reader_cxx () |
virtual size_t | read_next_block (void *block, size_t block_size)=0 |
virtual const char * | get_presentation_name () const =0 |
virtual void | set_presentation_name (const char *presentation_name)=0 |
virtual cgul_block_reader_t | as_block_reader () const =0 |
This class provides a proper C++ abstract base class for the cgul_block_reader
interface.
|
inlinevirtual |
Virtual destructor.
References as_block_reader(), get_presentation_name(), read_next_block(), and set_presentation_name().
|
pure virtual |
Virtual method that reads one block of data block
of size block_size
bytes from an external data source. The user is responsible for making sure block
points to at least block_size
contiguous bytes of memory. This method returns the number of bytes read or 0
if EOF is reached without error. If an error occurs, 0
is returned, and an exception is thrown.
[in] | block | block |
[in] | block_size | block size in bytes |
Implemented in cgul_block_reader_file_cxx, and cgul_block_reader_memory_cxx.
Referenced by ~cgul_block_reader_cxx().
|
pure virtual |
Virtual method that returns the presentation name.
Implemented in cgul_block_reader_file_cxx, and cgul_block_reader_memory_cxx.
Referenced by ~cgul_block_reader_cxx().
|
pure virtual |
Virtual method that sets the presentation name. The presentation name is primarily used for error reporting and can be set to anything, but it does need to be set again if the input source changes. An exception is thrown if an attempt is made to set the presentation name without first setting the input source.
[in] | presentation_name | presentation name |
Implemented in cgul_block_reader_file_cxx, and cgul_block_reader_memory_cxx.
Referenced by ~cgul_block_reader_cxx().
|
pure virtual |
Return the underlying cgul_block_reader
object.
get_obj()
which is similar to this method except it returns a pointer to the most derived class; whereas, this method returns the same pointer but cast to the base class. cgul_block_reader
object Implemented in cgul_block_reader_file_cxx, and cgul_block_reader_memory_cxx.
Referenced by cgul_stream_reader_cxx::add_block_reader(), cgul_stream_reader_cxx::cgul_stream_reader_cxx(), and ~cgul_block_reader_cxx().