![]() |
Faro Engine 0.0.0.b519570 (main)
|
Interface that reads and writes data to and from a stream. More...
#include <Stream.hpp>
Public Member Functions | |
| virtual uint32 | Read (void *destination, uint16 elementSize, uint32 elementCount)=0 |
| Read data from the stream. | |
| virtual uint32 | Write (void *source, uint16 elementSize, uint32 elementCount)=0 |
| Write data to the stream. | |
| virtual uint32 | Size ()=0 |
| Get the byte-size of this stream. | |
| virtual uint32 | Tell ()=0 |
| Get the current position of the stream. | |
| virtual void | Seek (EStreamSeekOrigin origin, int32 offset)=0 |
| Move the position relative to the specified origin. | |
| template<typename T > | |
| uint32 | Read (T *destination, uint32 elementCount) |
| Read data from the stream. | |
| template<typename T > | |
| T | Read () |
| Read en element from the stream. | |
| template<typename T > | |
| Array< T > | ReadToArray () |
| Read the data to an array of elements. | |
| String | ReadToString () |
| Read the data to a 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. | |
| void | Close () |
| Close the stream. This also releases it from memory. | |
| DataStreamCopy * | OpenCopy () |
| virtual void | Init () |
| Run the initialization logic of this object. Should be overriden by deriving classes. | |
Protected Member Functions | |
| 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 |
Interface that reads and writes data to and from a stream.
|
protected |
| void Faro::DataStream::Close | ( | ) |
Close the stream. This also releases it from memory.
|
overrideprotectedvirtual |
Run the destruction logic of this class. This also frees its memory.
Reimplemented from Faro::IObject.
Reimplemented in Faro::DataStreamCopy.
|
virtualinherited |
Run the initialization logic of this object. Should be overriden by deriving classes.
Reimplemented in Faro::DataStreamCopy, Faro::IGraphicsAdapterChild, Faro::GraphicsPipeline, Faro::GraphicsSemaphore, Faro::GraphicsBufferVK, Faro::GraphicsCommandListVK, Faro::GraphicsCommandListVK, Faro::GraphicsFenceVK, Faro::GraphicsFenceVK, Faro::GraphicsPipelineVK, Faro::GraphicsPipelineVK, Faro::GraphicsSemaphoreVK, and Faro::GraphicsSemaphoreVK.
| DataStreamCopy * Faro::DataStream::OpenCopy | ( | ) |
|
inline |
Read en element from the stream.
| T | Element type to read |
Read data from the stream.
| T | Element type to read |
| destination | Destination memory. This must be a valid pointer. |
| elementCount | Amount of elements to read |
|
pure virtual |
Read data from the stream.
| destination | Destination memory. This must be a valid pointer. |
| elementSize | Size of a single element |
| elementCount | Amount of elements to read |
Implemented in Faro::DataStreamCopy.
Read the data to an array of elements.
| T | Element type to read |
| String Faro::DataStream::ReadToString | ( | ) |
|
protected |
|
pure virtual |
Move the position relative to the specified origin.
| origin | Start point of the seeking operation |
| offset | Amount of bytes to seek relative to the origin |
Implemented in Faro::DataStreamCopy.
Get the byte-size of this stream.
Implemented in Faro::DataStreamCopy.
Get the current position of the stream.
Implemented in Faro::DataStreamCopy.
Write data to the stream.
| T | Element type to write |
| source | Source memory |
| elementCount | Amount of elements to write |
Write an element to the stream.
| T | Element type to write |
| value | Element to write |
|
pure virtual |
Write data to the stream.
| source | Source memory |
| elementSize | Size of a single element |
| elementCount | Amount of elements to write |
Implemented in Faro::DataStreamCopy.
|
protected |