MemoryIStream.hpp

Useful for streaming data from contiguous memory. Status: RELEASE.

This file is part of Empirical, https://github.com/devosoft/Empirical Copyright (C) 2020 Michigan State University MIT Software license; see doc/LICENSE.md

Defines

INCLUDE_EMP_IO_MEMORY_ISTREAM_HPP_GUARD
struct MemoryBuf : public std::streambuf
#include <MemoryIStream.hpp>

Subclassed by MemoryIStream

Public Functions

inline MemoryBuf(const char *base, size_t size)
Parameters:
  • base – address to beginning of memory region to stream from

  • size – number of bytes available to stream

struct MemoryIStream : public virtual MemoryBuf, public std::istream
#include <MemoryIStream.hpp>

Public Functions

inline MemoryIStream(const char *base, size_t size)
Parameters:
  • base – address to beginning of memory region to stream from

  • size – number of bytes available to stream