Public Types | Public Member Functions

KFbxStream Class Reference

Search for all occurrences

Detailed Description

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>

List of all members.

Public Types

enum   eStreamState { eCLOSED = 0, eOPENED = 1, eEMPTY = 2 }
 
  • eCLOSED indicate a closed stream
    • eOPENED indicate an opened stream
    • eEMPTY indicate an empty stream
More...

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

Member Enumeration Documentation

  • eCLOSED indicate a closed stream
    • eOPENED indicate an opened stream
    • eEMPTY indicate an empty stream
Remarks:
Used internally to manage stream states
Enumerator:
eCLOSED 
eOPENED 
eEMPTY 

Definition at line 59 of file kfbxstream.h.

                 {
        eCLOSED = 0,
        eOPENED = 1,
        eEMPTY  = 2
    } eStreamState;

Constructor & Destructor Documentation

KFbxStream ( ) [inline]

Default constructor.

Definition at line 67 of file kfbxstream.h.

{};
virtual ~KFbxStream ( ) [inline, virtual]

Destructor.

Definition at line 71 of file kfbxstream.h.

{};

Member Function Documentation

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.

Returns:
True if successful.

Definition at line 80 of file kfbxstream.h.

{ return false; };
virtual bool Close ( ) [inline, virtual]

Close the stream.

Returns:
True if successful.

Definition at line 85 of file kfbxstream.h.

{ return false; };
virtual bool Flush ( ) [inline, virtual]

Empties the internal data of the stream.

Returns:
True if successful.

Definition at line 90 of file kfbxstream.h.

{ return false; };
virtual int Write ( const void *  pData,
int  pSize 
) [inline, virtual]

Writes a memory block.

Parameters:
pData Pointer to the memory block to write.
pSize Size (in bytes) of the memory block to write.
Returns:
The number of bytes written in the stream.

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.

Parameters:
pData Pointer to the memory block where the read bytes are stored.
pSize Number of bytes read from the stream.
Returns:
The actual number of bytes successfully 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); }

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

KFbxStream KFbxStream KFbxStream KFbxStream KFbxStream KFbxStream KFbxStream KFbxStream KFbxStream KFbxStream
KFbxStream KFbxStream KFbxStream KFbxStream KFbxStream KFbxStream KFbxStream KFbxStream KFbxStream KFbxStream