Disk ARchive  2.4.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions | Protected Member Functions
libdar::tronc Class Reference

makes a segment of a generic_file appear like a real generic_file More...

#include <tronc.hpp>

Inherits libdar::generic_file.

Inherited by libdar::trontextual.

List of all members.

Public Member Functions

 tronc (generic_file *f, const infinint &offset, const infinint &size, bool own_f=false)
 constructor
 tronc (generic_file *f, const infinint &offset, const infinint &size, gf_mode mode, bool own_f=false)
 tronc (generic_file *f, const infinint &offset, bool own_f=false)
 tronc (generic_file *f, const infinint &offset, gf_mode mode, bool own_f=false)
 ~tronc ()
 destructor
bool skip (const infinint &pos)
 inherited from generic_file
bool skip_to_eof ()
 inherited from generic_file
bool skip_relative (S_I x)
 inherited from generic_file
infinint get_position ()
 inherited from generic_file

Protected Member Functions

U_I inherited_read (char *a, U_I size)
 inherited from generic_file
void inherited_write (const char *a, U_I size)
 inherited from generic_file
void inherited_sync_write ()
 write down any pending data
void inherited_terminate ()
 destructor-like call, except that it is allowed to throw exceptions

Detailed Description

makes a segment of a generic_file appear like a real generic_file

Definition at line 46 of file src/libdar/tronc.hpp.


Constructor & Destructor Documentation

libdar::tronc::tronc ( generic_file f,
const infinint offset,
const infinint size,
bool  own_f = false 
)

constructor

Parameters:
fis the file to take the segment from
offsetis the position of the beginning of the segment
sizeis the size of the segment
own_fis true if this object has to owns and may destroy the 'f' object at tronc's destruction time
libdar::tronc::tronc ( generic_file f,
const infinint offset,
bool  own_f = false 
)

other constructor, the end of the segment is the end of the underlying generic_file only data before offset is inaccessible


Member Function Documentation

void libdar::tronc::inherited_sync_write ( ) [inline, protected, virtual]

write down any pending data

Note:
this method is called after read/write mode checking from sync_write() public method;

Implements libdar::generic_file.

Definition at line 87 of file src/libdar/tronc.hpp.

References libdar::generic_file::sync_write().

void libdar::tronc::inherited_terminate ( ) [inline, protected, virtual]

destructor-like call, except that it is allowed to throw exceptions

Note:
this method must never be called directly but using terminate() instead, generic_file class manages it to never be called more than once

Implements libdar::generic_file.

Definition at line 88 of file src/libdar/tronc.hpp.

References libdar::generic_file::terminate().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines