Generic base class for streamable data. Used for reducing memory usage when loading and unloading content of peripheral (KFbxPeripheral) objects.
Definition at line 49 of file kfbxstream.h.
#include <kfbxstream.h>
Public Types |
|
enum | eStreamState { eCLOSED = 0, eOPENED = 1, eEMPTY = 2 } |
|
|
Public Member Functions |
|
KFbxStream () | |
Default constructor. |
|
virtual | ~KFbxStream () |
Destructor. |
|
virtual eStreamState | State () |
Query the current state of the stream.
|
|
virtual bool | Open () |
Open the stream. |
|
virtual bool | Close () |
Close the stream. |
|
virtual bool | Flush () |
Empties the internal data of the stream.
|
|
virtual int | Write (const void *pData, int pSize) |
Writes a memory block. |
|
int | Write (const char *pData, int pSize) |
int | Write (const int *pData, int pSize) |
virtual int | Read (void *pData, int pSize) const |
Read bytes from the stream and store them in
the memory block. |
|
int | Read (char *pData, int pSize) const |
int | Read (int *pData, int pSize) const |
enum eStreamState |
Definition at line 59 of file kfbxstream.h.
{ eCLOSED = 0, eOPENED = 1, eEMPTY = 2 } eStreamState;
KFbxStream | ( | ) | [inline] |
virtual ~KFbxStream | ( | ) | [inline, virtual] |
virtual eStreamState State | ( | ) | [inline, virtual] |
Query the current state of the stream.
Definition at line 75 of file kfbxstream.h.
{ return eCLOSED; }
virtual bool Open | ( | ) | [inline, virtual] |
Open the stream.
Definition at line 80 of file kfbxstream.h.
{ return false; };
virtual bool Close | ( | ) | [inline, virtual] |
Close the stream.
Definition at line 85 of file kfbxstream.h.
{ return false; };
virtual bool Flush | ( | ) | [inline, virtual] |
Empties the internal data of the stream.
Definition at line 90 of file kfbxstream.h.
{ return false; };
virtual int Write | ( | const void * | pData, |
int | pSize | ||
) | [inline, virtual] |
Writes a memory block.
pData | Pointer to the memory block to write. |
pSize | Size (in bytes) of the memory block to write. |
Definition at line 97 of file kfbxstream.h.
{ return 0; }
int Write | ( | const char * | pData, |
int | pSize | ||
) | [inline] |
Definition at line 99 of file kfbxstream.h.
{ return Write((void*)pData, pSize); }
int Write | ( | const int * | pData, |
int | pSize | ||
) | [inline] |
Definition at line 100 of file kfbxstream.h.
{ return Write((void*)pData, pSize); }
virtual int Read | ( | void * | pData, |
int | pSize | ||
) | const [inline, virtual] |
Read bytes from the stream and store them in the memory block.
pData | Pointer to the memory block where the read bytes are stored. |
pSize | Number of bytes read from the stream. |
Definition at line 107 of file kfbxstream.h.
{ return 0; }
int Read | ( | char * | pData, |
int | pSize | ||
) | const [inline] |
Definition at line 109 of file kfbxstream.h.
{ return Read((void*)pData, pSize); }
int Read | ( | int * | pData, |
int | pSize | ||
) | const [inline] |
Definition at line 110 of file kfbxstream.h.
{ return Read((void*)pData, pSize); }