FDO API Reference Feature Data Objects
Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

FdoIStreamReaderTmpl< T > Class Template Reference

#include <IStreamReaderTmpl.h>

Inherits FdoIStreamReader.

Inherited by FdoIoObjectStreamReader< T >.

Inheritance diagram for FdoIStreamReaderTmpl< T >:

[legend]
List of all members.

Detailed Description

template<typename T>
class FdoIStreamReaderTmpl< T >

FdoIStreamReaderTmpl reads items from a stream of [T].

Definition at line 27 of file IStreamReaderTmpl.h.


Public Member Functions

virtual FDO_API_COMMON FdoInt64 GetIndex ()=0
 Get the current index in the stream.
virtual FDO_API_COMMON FdoInt64 GetLength ()=0
 Get the size of a stream.
virtual FDO_API_COMMON FdoInt32 ReadNext (FdoArray< T > *&buffer, const FdoInt32 offset=0, const FdoInt32 count=-1)=0
 Reads in the next block of items. Use ReadNext( buffer) to read in the entire stream. The caller is responsible to create/dispose the FdoArray.
virtual FDO_API_COMMON FdoInt32 ReadNext (T *buffer, const FdoInt32 offset=0, const FdoInt32 count=-1)=0
 Reads in the next block of items. Use ReadNext( buffer) to read in the entire stream.
virtual FDO_API_COMMON void Reset ()=0
 Reset the current index in the stream. Allows re-reading.
virtual FDO_API_COMMON void Skip (const FdoInt32 offset)=0
 Skips a number of items.

Member Function Documentation

template<typename T>
virtual FDO_API_COMMON FdoInt64 FdoIStreamReaderTmpl< T >::GetIndex  )  [pure virtual]
 

Get the current index in the stream.

Returns:
Returns the current index in the stream in number of items

Implemented in FdoIoObjectStreamReader< T >, and FdoIoObjectStreamReader< FdoByte >.

template<typename T>
virtual FDO_API_COMMON FdoInt64 FdoIStreamReaderTmpl< T >::GetLength  )  [pure virtual]
 

Get the size of a stream.

Returns:
Returns the size of the data source in number of items

Implemented in FdoIoObjectStreamReader< T >, and FdoIoObjectStreamReader< FdoByte >.

template<typename T>
virtual FDO_API_COMMON FdoInt32 FdoIStreamReaderTmpl< T >::ReadNext FdoArray< T > *&  buffer,
const FdoInt32  offset = 0,
const FdoInt32  count = -1
[pure virtual]
 

Reads in the next block of items. Use ReadNext( buffer) to read in the entire stream. The caller is responsible to create/dispose the FdoArray.

Parameters:
buffer FdoArray object holding data read in. Cannot be NULL
offset Index in the array indicating the beginning of the output buffer. If the end of the buffer, then read in appending mode (store at the end). Otherwise, overwrite the buffer. Throws "invalid parameter" exception if not in this range.
count Number of items to be read in. If -1 read the entire stream. Throws "invalid parameter" exception if not a positive value or -1.
Returns:
Returns number of items read.

Implemented in FdoIoObjectStreamReader< T >, and FdoIoObjectStreamReader< FdoByte >.

template<typename T>
virtual FDO_API_COMMON FdoInt32 FdoIStreamReaderTmpl< T >::ReadNext T *  buffer,
const FdoInt32  offset = 0,
const FdoInt32  count = -1
[pure virtual]
 

Reads in the next block of items. Use ReadNext( buffer) to read in the entire stream.

Parameters:
buffer Buffer holding data read in
offset Index in the buffer indicating the beginning of the output buffer. The caller is responsable for allocating a buffer of a proper size.
count Number of items to be read in. If -1 read the entire stream. Throws "invalid parameter" exception if not a positive value or -1.
Returns:
Returns the number of items actually read in. When 0 (zero) then the end-of-stream was reached.

Implemented in FdoIoObjectStreamReader< T >, and FdoIoObjectStreamReader< FdoByte >.

template<typename T>
virtual FDO_API_COMMON void FdoIStreamReaderTmpl< T >::Reset  )  [pure virtual]
 

Reset the current index in the stream. Allows re-reading.

Returns:
Returns nothing

Implemented in FdoIoObjectStreamReader< T >, and FdoIoObjectStreamReader< FdoByte >.

template<typename T>
virtual FDO_API_COMMON void FdoIStreamReaderTmpl< T >::Skip const FdoInt32  offset  )  [pure virtual]
 

Skips a number of items.

Parameters:
offset Number of items to skip. Must be a positive number
Returns:
Returns nothing

Implemented in FdoIoObjectStreamReader< T >, and FdoIoObjectStreamReader< FdoByte >.


The documentation for this class was generated from the following file:
Comments or suggestions? Send us feedback.