Main Page Modules Class Hierarchy Data Structures File List Data Fields Globals Related Pages

# OsclBinStream Class Reference
[OSCL Util]

`#include <oscl_bin_stream.h>`

Inheritance diagram for OsclBinStream:

## Public Methods
| OsclBinStream ()
bool | good ()
| This method determines if the stream is ok.
bool | eof ()
| This method determines if end of stream has been reached.
bool | fail ()
| This method determines if an error has occured in the stream.
void | Attach (void *buffer, uint32 l_length)
| This methods specifies the data buffer to attach to the stream.
void | Attach (const uint32 numFragments, const OsclMemoryFragment *fragPtr)
| This method specifies the memory fragment array to use for input.
uint32 | tellg ()
| This method returns the current stream position.
void | Seek (uint32 absPosition)
| This method seeks to the specified stream position.
uint32 | PositionInBlock ()
| This method returns the current stream position.
void | seekFromCurrentPosition (int32 offset)
| This method seeks to the specified offset from the current location.
## Protected Types
enum | state_t { GOOD_STATE, EOF_STATE, FAIL_STATE }
## Protected Methods
bool | ReserveSpace (uint32 size)
bool | HaveRoomInCurrentBlock (uint32 size)
## Protected Attributes
state_t | state
uint8 * | pBasePosition
uint8 * | pPosition
uint32 | length
const OsclMemoryFragment * | nextFragPtr
int | fragsLeft
const OsclMemoryFragment * | firstFragPtr
int | numFrags
OsclMemoryFragment | specialFragBuffer

## Member Enumeration Documentation

enum OsclBinStream::state_t`[protected]`

  | Enumeration values:
  GOOD_STATE |
  EOF_STATE |
  FAIL_STATE |

## Constructor & Destructor Documentation

OsclBinStream::OsclBinStream | ( |  | ) | `[inline]`

## Member Function Documentation

void OsclBinStream::Attach | ( | const uint32 | numFragments,
|  | const OsclMemoryFragment * | fragPtr
| ) |

  | This method specifies the memory fragment array to use for input. This array should remain static while the stream refers to it. Parameters:
  numFragments | is the number of elements in the array
  fragPtr | is the pointer to the MemoryFragment array

void OsclBinStream::Attach | ( | void * | buffer,
|  | uint32 | l_length
| ) |

  | This methods specifies the data buffer to attach to the stream. Parameters:
  buffer | will provide the input
  length | of the buffer

bool OsclBinStream::eof | ( |  | ) |

| This method determines if end of stream has been reached. Returns: true if end of stream has been reached.

bool OsclBinStream::fail | ( |  | ) |

| This method determines if an error has occured in the stream. Returns: true if an error occured in the stream.

bool OsclBinStream::good | ( |  | ) |

| This method determines if the stream is ok. Returns: true if stream is ok.

bool OsclBinStream::HaveRoomInCurrentBlock | ( | uint32 | size | ) | `[protected]`

uint32 OsclBinStream::PositionInBlock | ( |  | ) |

| This method returns the current stream position. Returns: stream position.

bool OsclBinStream::ReserveSpace | ( | uint32 | size | ) | `[protected]`

void OsclBinStream::Seek | ( | uint32 | absPosition | ) |

| This method seeks to the specified stream position. Returns: Stream position.

void OsclBinStream::seekFromCurrentPosition | ( | int32 | offset | ) |

  | This method seeks to the specified offset from the current location. Parameters:
  offset | from current stream location

uint32 OsclBinStream::tellg | ( |  | ) |

| This method returns the current stream position. This method is to be used if the input stream is a pointer to the MemoryFragment array Returns: Stream position.

## Field Documentation

const OsclMemoryFragment* OsclBinStream::firstFragPtr`[protected]`

int OsclBinStream::fragsLeft`[protected]`

uint32 OsclBinStream::length`[protected]`

const OsclMemoryFragment* OsclBinStream::nextFragPtr`[protected]`

int OsclBinStream::numFrags`[protected]`

uint8* OsclBinStream::pBasePosition`[protected]`

uint8* OsclBinStream::pPosition`[protected]`

OsclMemoryFragment OsclBinStream::specialFragBuffer`[protected]`

state_t OsclBinStream::state`[protected]`

The documentation for this class was generated from the following file:

- oscl_bin_stream.h