|
CeresEngine 0.2.0
A game development framework
|
An interface that all data streams must implement. More...
#include <CeresEngine/Foundation/IO/Stream.hpp>
Public Types | |
| using | Seek = IStream::Seek |
| An enumeration that describes how a data stream should be seeked. | |
Public Member Functions | |
| Poly (const Poly &other) | |
Creates a new Poly by copying an existing one. | |
| Poly (Poly &&other) noexcept | |
Creates a new Poly by moving an existing one. | |
| Poly (std::nullptr_t) noexcept | |
Creates a new empty Poly. | |
| template<typename TT = T> requires (std::is_default_constructible_v<TT>) | |
| Poly () noexcept | |
Creates a new empty Poly. | |
| template<typename TT , typename... Args> requires (std::is_convertible_v<TT*, T*>&& std::is_constructible_v<TT, Args&&...>) | |
| Poly (std::in_place_type_t< TT >, Args &&... args) | |
Creates a new Poly that holds a newly constructed object of type TT. | |
| template<typename... Args> requires (std::is_constructible_v<T, Args...>) | |
| Poly (Args &&... args) | |
Creates a new Poly that holds a newly constructed object of type T. | |
| template<typename TT > requires (std::is_convertible_v<TT*, T*> && Copyable) | |
| Poly (TT object) | |
Creates a new Poly that holds a copy constructed object of type TT. | |
| template<typename TT > requires (std::is_convertible_v<TT*, T*> && !Copyable) | |
| Poly (TT &&object) | |
Creates a new Poly that holds a copy constructed object of type TT. | |
| Poly (T *const instance) | |
Creates a new Poly instance by referencing another. | |
| template<typename U > requires (Copyable) | |
| Poly (const Poly< U, SmallSize, Copyable, BaseType > &other) | |
Creates a new Poly instance by referencing another. | |
| template<typename U > | |
| Poly (Poly< U, SmallSize, Copyable, BaseType > &&other) | |
Creates a new Poly instance by referencing another. | |
Public Member Functions inherited from CeresEngine::Poly< IStream, kStreamPolySize, false, IStream > | |
| Poly (const Poly &other) | |
Creates a new Poly by copying an existing one. | |
| Poly (Poly &&other) noexcept | |
Creates a new Poly by moving an existing one. | |
| Poly (std::nullptr_t) noexcept | |
Creates a new empty Poly. | |
| Poly () noexcept | |
Creates a new empty Poly. | |
| Poly (std::in_place_type_t< TT >, Args &&... args) | |
Creates a new Poly that holds a newly constructed object of type TT. | |
| Poly (Args &&... args) | |
Creates a new Poly that holds a newly constructed object of type T. | |
| Poly (TT object) | |
Creates a new Poly that holds a copy constructed object of type TT. | |
| Poly (TT &&object) | |
Creates a new Poly that holds a copy constructed object of type TT. | |
| Poly (IStream *const instance) | |
Creates a new Poly instance by referencing another. | |
| Poly (const Poly< U, SmallSize, Copyable, IStream > &other) | |
Creates a new Poly instance by referencing another. | |
| Poly (Poly< U, SmallSize, Copyable, IStream > &&other) | |
Creates a new Poly instance by referencing another. | |
| bool | isCopyable () const noexcept |
Checks if the Poly copy constructor can be safely called. | |
| Poly & | operator= (const Poly &other) |
Assigns a Poly by copying an existing one. | |
| Poly & | operator= (Poly &&other) |
Assigns a Poly by moving an existing one. | |
| Poly & | operator= (std::nullptr_t) noexcept |
Assigns the Poly a nullptr value. | |
| bool | isMovable () const noexcept |
Checks if the Poly move constructor can be safely called. | |
| ~Poly () noexcept | |
Destroys the Poly and destroys the object is present. | |
| TT & | emplace (Args &&... args) |
Emplace a new object of type TT into the Poly. | |
| TT & | emplace (TT &&instance) |
| bool | valid () const |
| Checks if the pointer has a valid object stored in it. | |
| bool | empty () const |
| Checks if the pointer has a valid object stored in it. | |
| operator bool () const | |
| Checks if the pointer has a valid object stored in it. | |
| IStream * | get () |
| const IStream * | get () const |
| IStream * | operator-> () |
| const IStream * | operator-> () const |
| const IStream & | operator* () const & |
| IStream & | operator* () & |
| & | |
| IStream && | operator* () && |
| & | |
| const std::type_info & | getTypeID () const |
| bool | is () const |
Checks if the hold object is of type TT. | |
| TT * | being () |
Safely casts the hold type to TT. | |
| const TT * | being () const |
Safely casts the hold type to TT. | |
| TT & | as () & |
Casts the hold type to TT. | |
| TT && | as () && |
Casts the hold type to TT. | |
| const TT & | as () const & |
Casts the hold type to TT. | |
Additional Inherited Members | |
Static Public Attributes inherited from CeresEngine::Poly< IStream, kStreamPolySize, false, IStream > | |
| static constexpr bool | isSmall |
true if an object of type U will not cause an allocation. | |
An interface that all data streams must implement.
This class’s interface is common to all stream classes, including its subclasses InputStream and OutputStream.
Stream objects provide an easy way to read and write data to and from a variety of media in a device-independent way. You can create stream objects for data located in memory, in a file, or on a network (using sockets), and you can use stream objects without loading all of the data into memory at once.
By default, Stream instances that aren’t file-based are non-seekable, one-way streams (although custom seekable subclasses are possible). After you provide or consume data, you can’t retrieve the data from the stream.
An enumeration that describes how a data stream should be seeked.
|
inlinenoexcept |
Creates a new empty Poly.
|
inlineexplicit |
Creates a new Poly that holds a newly constructed object of type T.
| Args | the object constructor argument types |
| args | The object constructor arguments |
Creates a new Poly by copying an existing one.
| other | The instance to copy from |
Creates a new Poly by moving an existing one.
| other | The instance to move from |
|
inlineexplicit |
Creates a new Poly that holds a newly constructed object of type TT.
| TT | the object type |
| Args | the object constructor argument types |
| args | The object constructor arguments |
|
inlinenoexcept |
Creates a new empty Poly.
Creates a new Poly that holds a copy constructed object of type TT.
| TT | the object type |
Creates a new Poly that holds a copy constructed object of type TT.
| TT | the object type |