output_cpio_child Class Reference

#include <cpio_child.h>

Inheritance diagram for output_cpio_child:

output

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_childoperator= (const output_cpio_child &)

Private Attributes

output::pointer deeper
nstring name
long length
long pos
bool bol
time_t mtime

Detailed Description

The output_cpio_child class is used to represent a cpio archive member with a known length.

Definition at line 32 of file cpio_child.h.


Constructor & Destructor Documentation

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.

Parameters:
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.


Member Function Documentation

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.

Parameters:
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]

The filename method is used to obtain the filename of this output.

Implements output.

const char* output_cpio_child::type_name (  )  const [protected, virtual]

The type_name method is used to determine the name of this output device or file or type.

Implements output.

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]

The write_inner method is used write data to the output, without taking the buffering into account.

Implements output.

void output_cpio_child::end_of_line_inner (  )  [protected, virtual]

The end_of_line_inner method is used to ensure that the current output position is at the beginning of a line, without taking the buffering into account.

Implements output.

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.


Field Documentation

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.

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.


The documentation for this class was generated from the following file:

Generated on Wed Mar 12 23:37:40 2008 for Aegis by  doxygen 1.5.5