1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-06-14 15:02:27 +03:00
Files
wsrep-lib/include/wsrep/data.hpp
2018-06-03 21:56:28 +03:00

37 lines
613 B
C++

//
// Copyright (C) 2018 Codership Oy <info@codership.com>
//
#ifndef WSREP_DATA_HPP
#define WSREP_DATA_HPP
namespace wsrep
{
class data
{
public:
data()
: buf_()
{
assign(0, 0);
}
data(const void* ptr, size_t len)
: buf_()
{
assign(ptr, len);
}
void assign(const void* ptr, size_t len)
{
buf_.ptr = ptr;
buf_.len = len;
}
const wsrep_buf_t& get() const { return buf_; }
private:
wsrep_buf_t buf_;
};
}
#endif // WSREP_DATA_HPP