PxDefaultMemoryInputData Class Reference

default implementation of a memory read stream More...

#include <PxDefaultStreams.h>

Inheritance diagram for PxDefaultMemoryInputData:
Collaboration diagram for PxDefaultMemoryInputData:

Public Member Functions

 PxDefaultMemoryInputData (PxU8 *data, PxU32 length)
 
virtual PxU32 read (void *dest, PxU32 count)
 read from the stream. The number of bytes read may be less than the number requested. More...
 
virtual PxU32 getLength () const
 return the length of the input data More...
 
virtual void seek (PxU32 pos)
 seek to the given offset from the start of the data. More...
 
virtual PxU32 tell () const
 return the current offset from the start of the data More...
 
- Public Member Functions inherited from PxInputData
virtual ~PxInputData ()
 
- Public Member Functions inherited from PxInputStream
virtual ~PxInputStream ()
 

Private Attributes

PxU32 mSize
 
const PxU8 * mData
 
PxU32 mPos
 

Detailed Description

default implementation of a memory read stream

See also
PxInputData

Constructor & Destructor Documentation

◆ PxDefaultMemoryInputData()

PxDefaultMemoryInputData::PxDefaultMemoryInputData ( PxU8 *  data,
PxU32  length 
)

Member Function Documentation

◆ getLength()

virtual PxU32 PxDefaultMemoryInputData::getLength ( ) const
virtual

return the length of the input data

Returns
size in bytes of the input data

Implements PxInputData.

◆ read()

virtual PxU32 PxDefaultMemoryInputData::read ( void *  dest,
PxU32  count 
)
virtual

read from the stream. The number of bytes read may be less than the number requested.

Parameters
[in]destthe destination address to which the data will be read
[in]countthe number of bytes requested
Returns
the number of bytes read from the stream.

Implements PxInputStream.

◆ seek()

virtual void PxDefaultMemoryInputData::seek ( PxU32  offset)
virtual

seek to the given offset from the start of the data.

Parameters
[in]offsetthe offset to seek to. If greater than the length of the data, this call is equivalent to seek(length);

Implements PxInputData.

◆ tell()

virtual PxU32 PxDefaultMemoryInputData::tell ( ) const
virtual

return the current offset from the start of the data

Returns
the offset to seek to.

Implements PxInputData.

Member Data Documentation

◆ mData

const PxU8* PxDefaultMemoryInputData::mData
private

◆ mPos

PxU32 PxDefaultMemoryInputData::mPos
private

◆ mSize

PxU32 PxDefaultMemoryInputData::mSize
private

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