staticlib_io  1.2.11
 All Classes Namespaces Files Functions Variables
Classes | Namespaces | Functions
limited_source.hpp File Reference
#include <ios>
#include "staticlib/config.hpp"
#include "staticlib/io/io_exception.hpp"
#include "staticlib/io/counting_source.hpp"
#include "staticlib/io/reference_source.hpp"
#include "staticlib/io/span.hpp"

Go to the source code of this file.

Classes

class  staticlib::io::limited_source< Source >
 Source wrapper that limits the number of bytes read through it and returns EOF on threshold exceed. More...

Namespaces

namespace  staticlib
namespace  staticlib::io

Functions

template<typename Source , class = typename std::enable_if<!std::is_lvalue_reference<Source>::value>::type>
limited_source< Source > staticlib::io::make_limited_source (Source &&source, size_t limit_bytes)
 Factory function for creating limited sources, created source wrapper will own specified source.
template<typename Source >
limited_source
< reference_source< Source > > 
staticlib::io::make_limited_source (Source &source, size_t limit_bytes)
 Factory function for creating limited sources, created source wrapper will NOT own specified source.