Open 3D Engine EMotionFX Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
MCore::Stream Class Referenceabstract

#include <Stream.h>

Inherited by MCore::File.

Public Member Functions

 Stream ()
 
virtual ~Stream ()
 
virtual uint32 GetType () const =0
 
virtual size_t Read (void *data, size_t length)
 
virtual size_t Write (const void *data, size_t length)
 
virtual Streamoperator<< (bool b)
 
virtual Streamoperator<< (char ch)
 
virtual Streamoperator<< (uint8 ch)
 
virtual Streamoperator<< (int16 number)
 
virtual Streamoperator<< (uint16 number)
 
virtual Streamoperator<< (int32 number)
 
virtual Streamoperator<< (uint32 number)
 
virtual Streamoperator<< (uint64 number)
 
virtual Streamoperator<< (int64 number)
 
virtual Streamoperator<< (float number)
 
virtual Streamoperator<< (double number)
 
virtual Streamoperator<< (AZStd::string &text)
 
virtual Streamoperator<< (const char *text)
 
virtual Streamoperator>> (bool &b)
 
virtual Streamoperator>> (char &ch)
 
virtual Streamoperator>> (uint8 &ch)
 
virtual Streamoperator>> (int16 &number)
 
virtual Streamoperator>> (uint16 &number)
 
virtual Streamoperator>> (int32 &number)
 
virtual Streamoperator>> (uint32 &number)
 
virtual Streamoperator>> (int64 &number)
 
virtual Streamoperator>> (uint64 &number)
 
virtual Streamoperator>> (float &number)
 
virtual Streamoperator>> (double &number)
 
virtual Streamoperator>> (AZStd::string &text)
 

Detailed Description

The stream abstract base class. A stream is a source from which can be read and to which can be written. This could be a file, a TCP/IP stream, or anything else you can imagine.

Constructor & Destructor Documentation

◆ Stream()

MCore::Stream::Stream ( )
inline

The constructor.

◆ ~Stream()

virtual MCore::Stream::~Stream ( )
inlinevirtual

The destructor.

Member Function Documentation

◆ GetType()

virtual uint32 MCore::Stream::GetType ( ) const
pure virtual

Get the unique type ID.

Returns
The type identification number.

Implemented in MCore::MemoryFile, and MCore::DiskFile.

◆ Read()

virtual size_t MCore::Stream::Read ( void *  data,
size_t  length 
)
inlinevirtual

Read a given amount of data from the stream.

Parameters
dataThe pointer where to store the read data.
lengthThe size in bytes of the data to read.
Returns
Returns the number of bytes read.

Reimplemented in MCore::File, MCore::MemoryFile, and MCore::DiskFile.

◆ Write()

virtual size_t MCore::Stream::Write ( const void *  data,
size_t  length 
)
inlinevirtual

Writes a given amount of data to the stream.

Parameters
dataThe pointer to the data to write.
lengthThe size in bytes of the data to write.
Returns
Returns the number of written bytes.

Reimplemented in MCore::File, MCore::MemoryFile, and MCore::DiskFile.


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