26 #ifndef SECU_MEMORY_FILE_HPP 27 #define SECU_MEMORY_FILE_HPP 38 class secu_memory_file :
public generic_file
48 void reset(U_I size) {
if(
is_terminated())
throw SRC_BUG; position = 0; data.resize(size); };
51 infinint get_size()
const {
return data.get_size(); };
54 infinint get_allocated_size()
const {
return data.get_allocated_size(); };
57 void randomize(U_I size) {
if(size > data.get_allocated_size()) reset(size); data.randomize(size); };
61 bool skippable(skippability direction,
const infinint & amount) {
return true; };
62 bool skip(
const infinint & pos);
64 bool skip_relative(S_I x);
65 infinint get_position()
const {
if(
is_terminated())
throw SRC_BUG;
return position; };
67 const secu_string & get_contents()
const {
return data; };
72 void inherited_read_ahead(
const infinint & amount) {};
73 U_I inherited_read(
char *a, U_I size);
74 void inherited_write(
const char *a, U_I size);
75 void inherited_sync_write() {};
76 void inherited_flush_read() {};
77 void inherited_terminate() {};
class generic_file is defined here as well as class fichierthe generic_file interface is widely used ...
contains a class that permits arbitrary large data storage
bool is_terminated() const
generic_file(gf_mode m)
main constructor
libdar namespace encapsulate all libdar symbols