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 basis::astring &target, int flags, const basis::astring &parms, const structures::string_set &keywords)
 the chunk is the unit found in the packing manifest in the bundle.
 manifest_chunk ()
virtual ~manifest_chunk ()
virtual void text_form (basis::base_string &state_fill) const
 Provides a text view of all the important info owned by this object.
 DEFINE_CLASS_NAME ("manifest_chunk")
void pack (basis::byte_array &target) const
 streams out into the "target".
bool unpack (basis::byte_array &source)
 streams in from the "source".

Static Public Member Functions

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

Public Attributes

basis::un_int _size
 the size of the packed file.
basis::astring _payload
 guts of the chunk, such as location for file on target or a variable definition.
basis::un_int _flags
 uses the special_bundling_flags.
basis::astring _parms
 the parameters to pass on the command line.
structures::string_set _keywords
 keywords applicable to this item.
basis::byte_array c_filetime
 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 basis::astring target,
int  flags,
const basis::astring parms,
const structures::string_set keywords 
) [inline]

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

Definition at line 68 of file common_bundle.h.

References c_filetime, and packed_filetime_size().

manifest_chunk::manifest_chunk (  )  [inline]

< default constructor.

Definition at line 75 of file common_bundle.h.

References c_filetime, and packed_filetime_size().

manifest_chunk::~manifest_chunk (  )  [virtual]

Definition at line 28 of file common_bundle.cpp.


Member Function Documentation

manifest_chunk::DEFINE_CLASS_NAME ( "manifest_chunk"   ) 
void manifest_chunk::pack ( basis::byte_array target  )  const
int manifest_chunk::packed_filetime_size (  )  [static]

Definition at line 31 of file common_bundle.cpp.

References filesystem::file_time::packed_size().

Referenced by manifest_chunk(), and read_a_filetime().

bool manifest_chunk::read_a_filetime ( filesystem::byte_filer bundle,
basis::byte_array found 
) [static]

retrieves packed_filetime_size() byte timestamp from the "bundle".

Definition at line 78 of file common_bundle.cpp.

References packed_filetime_size(), and filesystem::byte_filer::read().

Referenced by read_manifest().

astring manifest_chunk::read_a_string ( filesystem::byte_filer bundle  )  [static]

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

Definition at line 89 of file common_bundle.cpp.

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

Referenced by read_manifest().

static bool manifest_chunk::read_an_int ( filesystem::byte_filer bundle,
basis::un_int found 
) [static]

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

Referenced by read_manifest().

static bool manifest_chunk::read_an_obscured_int ( filesystem::byte_filer bundle,
basis::un_int found 
) [static]

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

Referenced by read_manifest().

bool manifest_chunk::read_manifest ( filesystem::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 110 of file common_bundle.cpp.

References _flags, _keywords, _parms, _payload, _size, c_filetime, read_a_filetime(), read_a_string(), read_an_int(), read_an_obscured_int(), and basis::array< contents >::reset().

virtual void manifest_chunk::text_form ( basis::base_string state_fill  )  const [inline, virtual]

Provides a text view of all the important info owned by this object.

It is understood that there could be a large amount of information and that this function might take a relatively long time to complete.

Implements basis::text_formable.

Definition at line 82 of file common_bundle.h.

References _flags, _parms, _payload, _size, basis::base_string::assign(), basis::text_formable::class_name(), and basis::astring::s().

bool manifest_chunk::unpack ( basis::byte_array source  ) 

Member Data Documentation

uses the special_bundling_flags.

Definition at line 57 of file common_bundle.h.

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

keywords applicable to this item.

Definition at line 59 of file common_bundle.h.

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

the parameters to pass on the command line.

Definition at line 58 of file common_bundle.h.

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

guts of the chunk, such as location for file on target or a variable definition.

Definition at line 56 of file common_bundle.h.

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

the size of the packed file.

Definition at line 55 of file common_bundle.h.

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

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 Sat Jan 28 04:25:09 2012 for hoople2 project by  doxygen 1.6.3