Faro Engine 0.0.0.b519570 (main)
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Faro::DataStreamCopy Class Reference

#include <Stream.hpp>

Inheritance diagram for Faro::DataStreamCopy:
Faro::DataStream Faro::IObject

Public Member Functions

uint32 Read (void *destination, uint16 elementSize, uint32 elementCount) override
 Read data from the stream.
 
uint32 Write (void *source, uint16 elementSize, uint32 elementCount) override
 Write data to the stream.
 
uint32 Size () override
 Get the byte-size of this stream.
 
uint32 Tell () override
 Get the current position of the stream.
 
void Seek (EStreamSeekOrigin origin, int32 offset) override
 Move the position relative to the specified origin.
 
void Init (DataStream *stream)
 
template<typename T >
uint32 Read (T *destination, uint32 elementCount)
 Read data from the stream.
 
template<typename T >
Read ()
 Read en element from the stream.
 
template<typename T >
uint32 Write (T *source, uint32 elementCount)
 Write data to the stream.
 
template<typename T >
void Write (T value)
 Write an element to the stream.
 
template<typename T >
Array< TReadToArray ()
 Read the data to an array of elements.
 
String ReadToString ()
 Read the data to a stream.
 
void Close ()
 Close the stream. This also releases it from memory.
 
DataStreamCopyOpenCopy ()
 

Protected Member Functions

void Init () override
 Run the initialization logic of this object. Should be overriden by deriving classes.
 
void Destroy () override
 Run the destruction logic of this class. This also frees its memory.
 
void AddCopy (DataStream *otherStream)
 
void RemoveCopy (DataStream *otherStream)
 

Protected Attributes

uint32 copies = 0
 

Member Function Documentation

◆ AddCopy()

void Faro::DataStream::AddCopy ( DataStream otherStream)
protectedinherited

◆ Close()

void Faro::DataStream::Close ( )
inherited

Close the stream. This also releases it from memory.

◆ Destroy()

void Faro::DataStreamCopy::Destroy ( )
overrideprotectedvirtual

Run the destruction logic of this class. This also frees its memory.

Warning
When overriding, the super call must be performed last

Reimplemented from Faro::DataStream.

◆ Init() [1/2]

void Faro::DataStreamCopy::Init ( )
overrideprotectedvirtual

Run the initialization logic of this object. Should be overriden by deriving classes.

Reimplemented from Faro::IObject.

◆ Init() [2/2]

void Faro::DataStreamCopy::Init ( DataStream stream)

◆ OpenCopy()

DataStreamCopy * Faro::DataStream::OpenCopy ( )
inherited

◆ Read() [1/3]

template<typename T >
T Faro::DataStream::Read ( )
inlineinherited

Read en element from the stream.

Template Parameters
TElement type to read
Returns
T Element that was read

◆ Read() [2/3]

template<typename T >
uint32 Faro::DataStream::Read ( T *  destination,
uint32  elementCount 
)
inlineinherited

Read data from the stream.

Template Parameters
TElement type to read
Parameters
destinationDestination memory. This must be a valid pointer.
elementCountAmount of elements to read
Returns
uint32 Amount of elements read

◆ Read() [3/3]

uint32 Faro::DataStreamCopy::Read ( void *  destination,
uint16  elementSize,
uint32  elementCount 
)
overridevirtual

Read data from the stream.

Parameters
destinationDestination memory. This must be a valid pointer.
elementSizeSize of a single element
elementCountAmount of elements to read
Returns
uint32 Amount of bytes read

Implements Faro::DataStream.

◆ ReadToArray()

template<typename T >
Array< T > Faro::DataStream::ReadToArray ( )
inlineinherited

Read the data to an array of elements.

Template Parameters
TElement type to read
Returns
Array<T> Array of elements read from the stream

◆ ReadToString()

String Faro::DataStream::ReadToString ( )
inherited

Read the data to a stream.

Returns
String String read from the stream

◆ RemoveCopy()

void Faro::DataStream::RemoveCopy ( DataStream otherStream)
protectedinherited

◆ Seek()

void Faro::DataStreamCopy::Seek ( EStreamSeekOrigin  origin,
int32  offset 
)
overridevirtual

Move the position relative to the specified origin.

Parameters
originStart point of the seeking operation
offsetAmount of bytes to seek relative to the origin

Implements Faro::DataStream.

◆ Size()

uint32 Faro::DataStreamCopy::Size ( )
overridevirtual

Get the byte-size of this stream.

Returns
uint32 Amount of bytes in this stream

Implements Faro::DataStream.

◆ Tell()

uint32 Faro::DataStreamCopy::Tell ( )
overridevirtual

Get the current position of the stream.

Returns
uint32 Current position

Implements Faro::DataStream.

◆ Write() [1/3]

template<typename T >
uint32 Faro::DataStream::Write ( T source,
uint32  elementCount 
)
inlineinherited

Write data to the stream.

Template Parameters
TElement type to write
Parameters
sourceSource memory
elementCountAmount of elements to write
Returns
uint32 Amount of elements written

◆ Write() [2/3]

template<typename T >
void Faro::DataStream::Write ( T  value)
inlineinherited

Write an element to the stream.

Template Parameters
TElement type to write
Parameters
valueElement to write

◆ Write() [3/3]

uint32 Faro::DataStreamCopy::Write ( void source,
uint16  elementSize,
uint32  elementCount 
)
overridevirtual

Write data to the stream.

Parameters
sourceSource memory
elementSizeSize of a single element
elementCountAmount of elements to write
Returns
uint32 Amount of bytes written

Implements Faro::DataStream.

Member Data Documentation

◆ copies

uint32 Faro::DataStream::copies = 0
protectedinherited

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