30 #include "../my_config.h"
44 mem_block(U_I size = 0);
45 mem_block(
const mem_block & ref) =
delete;
46 mem_block(mem_block && ref) noexcept;
47 mem_block & operator = (
const mem_block & ref) =
delete;
48 mem_block & operator = (mem_block && ref) noexcept;
52 void resize(U_I size);
54 U_I read(
char *a, U_I size);
55 U_I write(
const char *a, U_I size);
56 void rewind_read(U_I offset = 0);
57 void reset() { data_size = 0; read_cursor = 0; write_cursor = 0; };
58 U_I get_max_size()
const {
return alloc_size; };
59 U_I get_data_size()
const {
return data_size; };
60 U_I get_read_offset()
const {
return read_cursor; };
61 bool all_is_read()
const {
return read_cursor == data_size; };
62 bool is_full()
const {
return data_size == alloc_size; };
63 bool is_empty()
const {
return data_size == 0; };
65 char* get_addr() {
return data; };
66 void set_data_size(U_I size);
75 void move_from(mem_block && ref);
are defined here basic integer types that tend to be portable
libdar namespace encapsulate all libdar symbols