manifest_chunk Struct Reference

we will read the manifest pieces out of our own exe image. More...

#include <common_bundle.h>

Inheritance diagram for manifest_chunk:

Inheritance graph
[legend]
Collaboration diagram for manifest_chunk:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 manifest_chunk (int size, const istring &target, int flags, const istring &parms, const string_set &keywords)
 the chunk is the unit found in the packing manifest in the bundle.
 manifest_chunk ()
virtual ~manifest_chunk ()
 IMPLEMENT_CLASS_NAME ("manifest_chunk")
void pack (byte_array &target) const
 streams out into the "target".
bool unpack (byte_array &source)
 streams in from the "source".

Static Public Member Functions

static bool read_manifest (byte_filer &bundle, manifest_chunk &to_fill)
 reads a chunk out of the "bundle" and stores it in "to_fill".
static istring read_a_string (byte_filer &bundle)
 reads a string from the "bundle" file, one byte at a time.
static bool read_an_int (byte_filer &bundle, int &found)
 reads an integer (4 bytes) from the file into "found".
static bool read_an_obscured_int (byte_filer &bundle, int &found)
 reads in our obscured packing format for an int, which takes 8 bytes.
static bool read_a_timestamp (byte_filer &bundle, byte_array &found)
 retrieves an 8 byte timestamp from the "bundle".

Public Attributes

int _size
 the size of the packed file.
istring _target
 the location for this file on the target.
int _flags
 uses the special_bundling_flags.
istring _parms
 the parameters to pass on the command line.
string_set _keywords
 keywords applicable to this item.
byte_array _timestamp
 more than enough room for unix file time.

Detailed Description

we will read the manifest pieces out of our own exe image.

the manifest chunks provide us with enough information to unpack the data chunks that come afterward.

Definition at line 53 of file common_bundle.h.


Constructor & Destructor Documentation

manifest_chunk::manifest_chunk ( int  size,
const istring target,
int  flags,
const istring parms,
const string_set keywords 
) [inline]

the chunk is the unit found in the packing manifest in the bundle.

Definition at line 66 of file common_bundle.h.

References _timestamp.

manifest_chunk::manifest_chunk (  )  [inline]

Definition at line 73 of file common_bundle.h.

References _timestamp.

manifest_chunk::~manifest_chunk (  )  [virtual]

Definition at line 22 of file common_bundle.cpp.


Member Function Documentation

manifest_chunk::IMPLEMENT_CLASS_NAME ( "manifest_chunk"   ) 

void manifest_chunk::pack ( byte_array target  )  const

streams out into the "target".

Definition at line 25 of file common_bundle.cpp.

References _flags, _keywords, _parms, _size, _target, _timestamp, basis::attach(), basis::obscure_attach(), string_set::pack(), and istring::pack().

bool manifest_chunk::unpack ( byte_array source  ) 

streams in from the "source".

Definition at line 35 of file common_bundle.cpp.

References _flags, _keywords, _parms, _size, _target, _timestamp, basis::detach(), basis::obscure_detach(), array< contents >::subarray(), string_set::unpack(), istring::unpack(), and array< contents >::zap().

bool manifest_chunk::read_manifest ( byte_filer bundle,
manifest_chunk to_fill 
) [static]

reads a chunk out of the "bundle" and stores it in "to_fill".

false is returned if the read failed.

Definition at line 96 of file common_bundle.cpp.

References _flags, _keywords, _parms, _size, _target, _timestamp, read_a_string(), read_a_timestamp(), read_an_int(), read_an_obscured_int(), and array< contents >::reset().

istring manifest_chunk::read_a_string ( byte_filer bundle  )  [static]

reads a string from the "bundle" file, one byte at a time.

Definition at line 75 of file common_bundle.cpp.

References byte_filer::eof(), FUNCDEF, and byte_filer::read().

Referenced by read_manifest().

bool manifest_chunk::read_an_int ( byte_filer bundle,
int &  found 
) [static]

reads an integer (4 bytes) from the file into "found".

Definition at line 48 of file common_bundle.cpp.

References basis::detach(), FUNCDEF, and byte_filer::read().

Referenced by read_manifest().

bool manifest_chunk::read_an_obscured_int ( byte_filer bundle,
int &  found 
) [static]

reads in our obscured packing format for an int, which takes 8 bytes.

Definition at line 57 of file common_bundle.cpp.

References FUNCDEF, basis::obscure_detach(), and byte_filer::read().

Referenced by read_manifest().

bool manifest_chunk::read_a_timestamp ( byte_filer bundle,
byte_array found 
) [static]

retrieves an 8 byte timestamp from the "bundle".

Definition at line 66 of file common_bundle.cpp.

References FUNCDEF, and byte_filer::read().

Referenced by read_manifest().


Member Data Documentation

int manifest_chunk::_size

the size of the packed file.

Definition at line 55 of file common_bundle.h.

Referenced by pack(), read_manifest(), and unpack().

istring manifest_chunk::_target

the location for this file on the target.

Definition at line 56 of file common_bundle.h.

Referenced by pack(), read_manifest(), and unpack().

int manifest_chunk::_flags

uses the special_bundling_flags.

Definition at line 57 of file common_bundle.h.

Referenced by pack(), read_manifest(), and unpack().

istring manifest_chunk::_parms

the parameters to pass on the command line.

Definition at line 58 of file common_bundle.h.

Referenced by pack(), read_manifest(), and unpack().

string_set manifest_chunk::_keywords

keywords applicable to this item.

Definition at line 59 of file common_bundle.h.

Referenced by pack(), read_manifest(), and unpack().

byte_array manifest_chunk::_timestamp

more than enough room for unix file time.

Definition at line 60 of file common_bundle.h.

Referenced by manifest_chunk(), pack(), read_manifest(), and unpack().


The documentation for this struct was generated from the following files:
Generated on Fri Nov 21 04:31:50 2008 for HOOPLE Libraries by  doxygen 1.5.1