#include <cpio_child.h>
Public Member Functions | |
virtual | ~output_cpio_child () |
Static Public Member Functions | |
static pointer | create (const output::pointer &deeper, const nstring &name, long len, time_t mtime) |
Protected Member Functions | |
nstring | filename () const |
const char * | type_name () const |
long | ftell_inner () const |
void | write_inner (const void *data, size_t length) |
void | end_of_line_inner () |
Private Member Functions | |
output_cpio_child (const output::pointer &deeper, const nstring &name, long len, time_t mtime) | |
void | changed_size () |
void | padding () |
void | hex8 (long) |
void | header () |
output_cpio_child () | |
output_cpio_child (const output_cpio_child &) | |
output_cpio_child & | operator= (const output_cpio_child &) |
Private Attributes | |
output::pointer | deeper |
nstring | name |
long | length |
long | pos |
bool | bol |
time_t | mtime |
Definition at line 32 of file cpio_child.h.
virtual output_cpio_child::~output_cpio_child | ( | ) | [virtual] |
The destructor.
output_cpio_child::output_cpio_child | ( | const output::pointer & | deeper, | |
const nstring & | name, | |||
long | len, | |||
time_t | mtime | |||
) | [private] |
The constructor. It is private on purpose, use the "create" class method instead.
deeper | The underlying output to which the CPIO archive is to be written. | |
name | The the archive member name for this file. | |
len | The length instance variable is used to remember the lenbgth of this archive member. It is an error if you write a different number of bytes. | |
mtime | The modify time to insert into the archive. |
output_cpio_child::output_cpio_child | ( | ) | [private] |
The default constructor. Do not use.
output_cpio_child::output_cpio_child | ( | const output_cpio_child & | ) | [private] |
The copy constructor. Do not use.
static pointer output_cpio_child::create | ( | const output::pointer & | deeper, | |
const nstring & | name, | |||
long | len, | |||
time_t | mtime | |||
) | [static] |
The create class method is used to create new dynamically allocated instances of this class.
deeper | The underlying output to which the CPIO archive is to be written. | |
name | The the archive member name for this file. | |
len | The length instance variable is used to remember the lenbgth of this archive member. It is an error if you write a different number of bytes. | |
mtime | The modify time to insert into the archive. |
nstring output_cpio_child::filename | ( | ) | const [protected, virtual] |
const char* output_cpio_child::type_name | ( | ) | const [protected, virtual] |
long output_cpio_child::ftell_inner | ( | ) | const [protected, virtual] |
The ftell_inner method is used to determine the current file position, without taking the buffering into account.
Implements output.
void output_cpio_child::write_inner | ( | const void * | data, | |
size_t | length | |||
) | [protected, virtual] |
void output_cpio_child::end_of_line_inner | ( | ) | [protected, virtual] |
void output_cpio_child::changed_size | ( | ) | [private] |
the change_size method is used to print a fatal error when the data written to the output is different than the length we were given in the constructor.
void output_cpio_child::padding | ( | ) | [private] |
The padding method is used to insert enough padding to bring the archive member to a multiple of four bytes.
void output_cpio_child::hex8 | ( | long | ) | [private] |
The hex8 method is used to write a long value as eight hexadecimal characters (big endian)i to the deeper output.
void output_cpio_child::header | ( | ) | [private] |
The header method is used to write the archive header to the deeper output.
output_cpio_child& output_cpio_child::operator= | ( | const output_cpio_child & | ) | [private] |
The assignment operator. Do not use.
output::pointer output_cpio_child::deeper [private] |
The deeper instance variable is used to remember the underlying output to which the CPIO archive is to be written.
Definition at line 102 of file cpio_child.h.
nstring output_cpio_child::name [private] |
The name instance variable is used to remember the archive member name for this file.
Definition at line 108 of file cpio_child.h.
long output_cpio_child::length [private] |
The length instance variable is used to remember the lenbgth of this archiove member.
Definition at line 114 of file cpio_child.h.
long output_cpio_child::pos [private] |
The pos instance variable is used to remember the current output position.
Definition at line 120 of file cpio_child.h.
bool output_cpio_child::bol [private] |
The bol instance variable is used to remember whether or not we are at the beginning of a line.
Definition at line 126 of file cpio_child.h.
time_t output_cpio_child::mtime [private] |
The mtime instance variable is used to remember the time to insert into the file header.
Definition at line 157 of file cpio_child.h.