feisty meow concerns codebase
2.140
|
we will read the manifest pieces out of our own exe image. More...
#include <common_bundle.h>
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. More... | |
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. More... | |
DEFINE_CLASS_NAME ("manifest_chunk") | |
void | pack (basis::byte_array &target) const |
streams out into the "target". More... | |
bool | unpack (basis::byte_array &source) |
streams in from the "source". More... | |
Public Member Functions inherited from basis::text_formable | |
virtual const char * | class_name () const =0 |
Returns the bare name of this class as a constant character pointer. More... | |
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". More... | |
static basis::astring | read_a_string (filesystem::byte_filer &bundle) |
reads a string from the "bundle" file, one byte at a time. More... | |
static bool | read_an_int (filesystem::byte_filer &bundle, basis::un_int &found) |
reads an integer (4 bytes) from the file into "found". More... | |
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. More... | |
static bool | read_a_filetime (filesystem::byte_filer &bundle, basis::byte_array &found) |
retrieves packed_filetime_size() byte timestamp from the "bundle". More... | |
Public Attributes | |
basis::un_int | _size |
the size of the packed file. More... | |
basis::astring | _payload |
guts of the chunk, such as location for file on target or a variable definition. More... | |
basis::un_int | _flags |
uses the special_bundling_flags. More... | |
basis::astring | _parms |
the parameters to pass on the command line. More... | |
structures::string_set | _keywords |
keywords applicable to this item. More... | |
basis::byte_array | c_filetime |
more than enough room for unix file time. More... | |
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.
|
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().
|
inline |
< default constructor.
Definition at line 75 of file common_bundle.h.
References c_filetime, and packed_filetime_size().
|
virtual |
Definition at line 28 of file common_bundle.cpp.
manifest_chunk::DEFINE_CLASS_NAME | ( | "manifest_chunk" | ) |
void manifest_chunk::pack | ( | basis::byte_array & | target | ) | const |
streams out into the "target".
Definition at line 37 of file common_bundle.cpp.
References structures::attach(), and structures::obscure_attach().
|
static |
Definition at line 31 of file common_bundle.cpp.
References filesystem::file_time::packed_size().
Referenced by manifest_chunk().
|
static |
retrieves packed_filetime_size() byte timestamp from the "bundle".
Definition at line 78 of file common_bundle.cpp.
References FUNCDEF, and filesystem::byte_filer::read().
|
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(), FUNCDEF, and filesystem::byte_filer::read().
|
static |
reads an integer (4 bytes) from the file into "found".
Definition at line 60 of file common_bundle.cpp.
References structures::detach(), FUNCDEF, and filesystem::byte_filer::read().
|
static |
reads in our obscured packing format for an int, which takes 8 bytes.
Definition at line 69 of file common_bundle.cpp.
References FUNCDEF, structures::obscure_detach(), and filesystem::byte_filer::read().
|
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, and basis::array< contents >::reset().
|
inlinevirtual |
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 | ) |
streams in from the "source".
Definition at line 47 of file common_bundle.cpp.
References structures::detach(), basis::array< contents >::length(), structures::obscure_detach(), basis::array< contents >::subarray(), and basis::array< contents >::zap().
basis::un_int manifest_chunk::_flags |
uses the special_bundling_flags.
Definition at line 57 of file common_bundle.h.
Referenced by read_manifest(), and text_form().
structures::string_set manifest_chunk::_keywords |
keywords applicable to this item.
Definition at line 59 of file common_bundle.h.
Referenced by read_manifest().
basis::astring manifest_chunk::_parms |
the parameters to pass on the command line.
Definition at line 58 of file common_bundle.h.
Referenced by read_manifest(), and text_form().
basis::astring manifest_chunk::_payload |
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 read_manifest(), and text_form().
basis::un_int manifest_chunk::_size |
the size of the packed file.
Definition at line 55 of file common_bundle.h.
Referenced by read_manifest(), and text_form().
basis::byte_array manifest_chunk::c_filetime |
more than enough room for unix file time.
Definition at line 60 of file common_bundle.h.
Referenced by manifest_chunk(), and read_manifest().