Open 3D Engine EMotionFX Gem API Reference 26.05.0
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 Stream & operator<< (bool b)
 
virtual Stream & operator<< (char ch)
 
virtual Stream & operator<< (uint8 ch)
 
virtual Stream & operator<< (int16 number)
 
virtual Stream & operator<< (uint16 number)
 
virtual Stream & operator<< (int32 number)
 
virtual Stream & operator<< (uint32 number)
 
virtual Stream & operator<< (uint64 number)
 
virtual Stream & operator<< (int64 number)
 
virtual Stream & operator<< (float number)
 
virtual Stream & operator<< (double number)
 
virtual Stream & operator<< (AZStd::string &text)
 
virtual Stream & operator<< (const char *text)
 
virtual Stream & operator>> (bool &b)
 
virtual Stream & operator>> (char &ch)
 
virtual Stream & operator>> (uint8 &ch)
 
virtual Stream & operator>> (int16 &number)
 
virtual Stream & operator>> (uint16 &number)
 
virtual Stream & operator>> (int32 &number)
 
virtual Stream & operator>> (uint32 &number)
 
virtual Stream & operator>> (int64 &number)
 
virtual Stream & operator>> (uint64 &number)
 
virtual Stream & operator>> (float &number)
 
virtual Stream & operator>> (double &number)
 
virtual Stream & operator>> (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::DiskFile, and MCore::MemoryFile.

◆ 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::DiskFile, MCore::MemoryFile, and MCore::File.

◆ 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::DiskFile, MCore::MemoryFile, and MCore::File.


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