2#include <fc/io/iostream.hpp>
15 size_t size()
const {
return _size; }
16 size_t seek(
size_t pos ) {
return _size = pos; }
38 size_t size()
const {
return _data.size(); }
39 size_t pos()
const {
return _pos; }
42 return _pos = std::min<size_t>(_data.size(),
pos);
47 auto avail = std::min<size_t>( _data.size()-_pos,
len );
48 if( avail == 0 )
throw fc::eof_exception();
59 if( _pos == _data.size() )
throw fc::eof_exception();
65 auto avail = std::max<size_t>( _data.size(), _pos +
len );
71 char*
data() {
return _data.data(); }
77 std::vector<char> _data;
virtual size_t writesome(const char *buf, size_t len)
virtual size_t readsome(char *buf, size_t len)
virtual size_t writesome(const char *, size_t len)
Defines exception's used by fc.
memcpy((char *) pInfo->slotDescription, s, l)