Search Results for

    Show / Hide Table of Contents

    Class MemoryReadStream

    Direct memory reading stream that uses a single allocation buffer.

    Inheritance
    Stream
    ReadStream
    MemoryReadStream
    Inherited Members
    Stream::_hasError
    ReadStream::CanRead()
    Stream::CanWrite()
    ReadStream::data
    ReadStream::DEPRECATED("Use Read method") void ReadStringAnsi(StringAnsi* data)
    Stream::HasError()
    ReadStream::lock
    ReadStream::Read(String& data)
    ReadStream::Read(String& data, int16 lock)
    ReadStream::Read(StringAnsi& data)
    ReadStream::Read(StringAnsi& data, int8 lock)
    ReadStream::Read(CommonValue& data)
    ReadStream::Read(VariantType& data)
    ReadStream::Read(Variant& data)
    ReadStream::Read(T& data)
    ReadStream::Read(T*& data)
    ReadStream::Read(ScriptingObjectReference<T>& v)
    ReadStream::Read(SoftObjectReference<T>& v)
    ReadStream::Read(AssetReference<T>& v)
    ReadStream::Read(WeakAssetReference<T>& v)
    ReadStream::Read(SoftAssetReference<T>& v)
    ReadStream::Read(Array<T, AllocationType>& data)
    ReadStream::Read(Dictionary<KeyType, ValueType, AllocationType>& data)
    ReadStream::Read(BoundingBox& box, bool useDouble=false)
    ReadStream::Read(BoundingSphere& sphere, bool useDouble=false)
    ReadStream::Read(Transform& transform, bool useDouble=false)
    ReadStream::Read(Ray& ray, bool useDouble=false)
    ReadStream::ReadBool()
    ReadStream::ReadByte()
    ReadStream::ReadByte(byte* data)
    ReadStream::ReadChar()
    ReadStream::ReadChar(Char* data)
    ReadStream::ReadDouble(double* data)
    ReadStream::ReadFloat(float* data)
    ReadStream::ReadInt16(int16* data)
    ReadStream::ReadInt32(int32* data)
    ReadStream::ReadInt64(int64* data)
    ReadStream::ReadInt8(int8* data)
    ReadStream::ReadJson(ISerializable* obj)
    ReadStream::ReadUint16(uint16* data)
    ReadStream::ReadUint32(uint32* data)
    ReadStream::ReadUint64(uint64* data)
    ReadStream::ReadUint8(uint8* data)
    Stream::Stream()
    ReadStream::useDouble
    Stream::~Stream()
    Assembly: FlaxEngine.dll
    File: Engine/Serialization/MemoryReadStream.h
    Syntax
    public class MemoryReadStream : public ReadStream

    Constructors

    MemoryReadStream()

    Init (empty, cannot access before Init())

    Initializes a new instance of the MemoryReadStream class.

    Declaration
    public MemoryReadStream()

    MemoryReadStream(const Array<T, AllocationType>& data)

    Initializes a new instance of the MemoryReadStream class.

    Declaration
    public MemoryReadStream(const Array<T, AllocationType>& data)
    Parameters
    Array<T, AllocationType> data

    Array with data to read from.

    Type Parameters
    typename T

    typename AllocationType

    MemoryReadStream(const byte* bytes, uint32 length)

    Initializes a new instance of the MemoryReadStream class.

    Declaration
    public MemoryReadStream(const byte* bytes, uint32 length)
    Parameters
    byte bytes

    Bytes with data to read from it (no memory cloned, using input buffer).

    uint32 length

    Amount of bytes

    MemoryReadStream(const Span<T>& data)

    Initializes a new instance of the MemoryReadStream class.

    Declaration
    public MemoryReadStream(const Span<T>& data)
    Parameters
    Span<T> data

    Span with data to read from.

    Type Parameters
    typename T

    Methods

    Close()

    Close the stream

    Declaration
    public virtual void Close() override
    Overrides
    Stream::Close()

    Flush()

    Flush the stream buffers

    Declaration
    public virtual void Flush() override
    Overrides
    Stream::Flush()

    GetLength()

    Gets length of the stream

    Declaration
    public virtual uint32 GetLength() override
    Returns
    uint32

    Length of the stream

    Overrides
    Stream::GetLength()

    GetPosition()

    Gets current position in the stream

    Declaration
    public virtual uint32 GetPosition() override
    Returns
    uint32

    Current position in the stream

    Overrides
    Stream::GetPosition()

    GetPositionHandle()

    Gets the current handle to position in buffer.

    Declaration
    public byte* GetPositionHandle() const
    Returns
    byte

    Init(const Array<T, AllocationType>& data)

    Init stream to the custom buffer location.

    Declaration
    public void Init(const Array<T, AllocationType>& data)
    Parameters
    Array<T, AllocationType> data

    Array with data to read from.

    Returns
    void

    Type Parameters
    typename T

    typename AllocationType

    Init(const byte* bytes, uint32 length)

    Init stream to the custom buffer location.

    Declaration
    public void Init(const byte* bytes, uint32 length)
    Parameters
    byte bytes

    Bytes with data to read from it (no memory cloned, using input buffer).

    uint32 length

    Amount of bytes.

    Move()

    Skips the data from the target buffer without reading from it. Moves the read pointer in the buffer forward.

    Declaration
    public T* Move()
    Returns
    T

    The pointer to the data in memory.

    Type Parameters
    typename T

    Move(uint32 bytes)

    Skips the data from the target buffer without reading from it. Moves the read pointer in the buffer forward.

    Declaration
    public void* Move(uint32 bytes)
    Parameters
    uint32 bytes

    The amount of bytes to read.

    Returns
    void

    The pointer to the data in memory.

    ReadBytes(void* data, uint32 bytes)

    Reads bytes from the stream

    Declaration
    public virtual void ReadBytes(void* data, uint32 bytes) override
    Parameters
    void data

    Data to read

    uint32 bytes

    Amount of bytes to read

    Overrides
    ReadStream::ReadBytes(void* data, uint32 bytes)

    SetPosition(uint32 seek)

    Set new position in the stream

    Declaration
    public virtual void SetPosition(uint32 seek) override
    Parameters
    uint32 seek

    New position in the stream

    Overrides
    Stream::SetPosition(uint32 seek)
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • MemoryReadStream()
      • MemoryReadStream(const Array<T, AllocationType>& data)
      • MemoryReadStream(const byte* bytes, uint32 length)
      • MemoryReadStream(const Span<T>& data)
    • Methods
      • Close()
      • Flush()
      • GetLength()
      • GetPosition()
      • GetPositionHandle()
      • Init(const Array<T, AllocationType>& data)
      • Init(const byte* bytes, uint32 length)
      • Move()
      • Move(uint32 bytes)
      • ReadBytes(void* data, uint32 bytes)
      • SetPosition(uint32 seek)
    Back to top Copyright © 2012-2024 Wojciech Figat