22 os.write(reinterpret_cast<const char*>(&buf.
kind),
sizeof(buf.
kind));
23 os.write(reinterpret_cast<const char*>(&buf.
length),
sizeof(buf.
length));
24 os.write(reinterpret_cast<const char*>(buf.
start), buf.
length);
32 if(buf.
start !=
nullptr) {
40 is.read(reinterpret_cast<char*>(&buf.
kind),
sizeof(buf.
kind));
41 is.read(reinterpret_cast<char*>(&tmplength),
sizeof(tmplength));
42 if(tmplength > buf.
length) {
43 if(buf.
start !=
nullptr) {
47 if(buf.
start !=
nullptr) {
54 is.read(reinterpret_cast<char*>(buf.
start), tmplength);
56 catch(ios_base::failure&) {
59 if(tmplength == 0 && buf.
start !=
nullptr) {
68 IOBuffers::IOBuffers() {
72 IOBuffers::IOBuffers(unique_ptr<Serial::DetachedBuffers>&& data) : _pOwner{move(data)} {
186 for(
size_t i = 0; i<
_pOwner->size(); ++i) {
196 for(
auto& elem: buf) {
204 RootIOBuffer& RootIOBuffer::operator=(
const IOBuffer& other) {
206 if(other.length > static_cast<uint32_t>(maxLength)) {
207 throw out_of_range(
"Need reallocating: " + to_string(other.length) +
" vs " + to_string(maxLength));
209 length =
static_cast<Int_t
>(other.length);
210 copy(other.start, other.start + other.length, start);
std::vector< IOBuffer > _buffers
std::vector< IOBuffer >::reverse_iterator reverse_iterator
std::vector< IOBuffer >::iterator iterator
const_iterator cend() const noexcept
from libcpp map cimport map from libcpp set cimport set as cset from libcpp string cimport string from libcpp pair cimport pair from libcpp vector cimport vector from libcpp unordered_map cimport unordered_map from libcpp cimport bool from libc stdint cimport uint32_t
istream & operator>>(istream &is, IOBuffer &buf)
YAML::Emitter & operator<<(YAML::Emitter &out, const ProcessDefinitions &s)
IOBuffer & operator[](size_t pos)
std::unique_ptr< Serial::DetachedBuffers > _pOwner
reverse_iterator rend() noexcept
IOBuffer & at(size_t pos)
std::vector< IOBuffer >::const_reverse_iterator const_reverse_iterator
const_iterator cbegin() const noexcept
const_reverse_iterator crbegin() const noexcept
iterator begin() noexcept
from libcpp map cimport map from libcpp set cimport set as cset from libcpp string cimport string from libcpp pair cimport pair from libcpp vector cimport vector from libcpp unordered_map cimport unordered_map from libcpp cimport bool from libc stdint cimport uint8_t
reverse_iterator rbegin() noexcept
Declarations for Hammer IO structs.
const_reverse_iterator crend() const noexcept
std::vector< IOBuffer >::const_iterator const_iterator
Serialization related typedefs and includes.
IOBuffers & operator=(const IOBuffers &)=delete