Data Structures | |
| class | ExtractedBFDFile |
| Used to cleanup when usage of an extracted BFD file is complete. More... | |
| class | BFDArchive |
| Factory for inserting/extracting files to/from the .edoc section of a binary file. More... | |
| class | BFDException |
| class | Section |
| Used to simplify writing/reading to/from bfd sections. More... | |
Functions | |
| void | InitialiseBFD () |
| Must be called before using any bfd related functions. | |
| bfd * | OpenBFDFile (std::string filename) |
| Opens the given file using bfd. | |
| void | ProcessReadBFD (std::list< EDoc::ManagedFile > &input_files, struct bfd *abfd, const EDoc::ManagedFile &filename) |
| Reads the contens of a binary file and extracts all relevant EDoc information from them if there is any. | |
| std::list< EDoc::ManagedFile > | HandleEDocSection (bfd *abfd, asection *asect, const EDoc::ManagedFile &arch) |
| Returns a list of temporary files that have been populated with the contents of an EDoc section. | |
| void | EmbedFileInBinary (const std::string &file_to_embed, const std::string embedded_name, const std::string &binary_file, std::string section) |
| Embeds the contents of the given file into the given section of a binary file. | |
Variables | |
| bool | bfd_initialised = false |
| EDocBFD::EmbedFileInBinary | ( | const std::string & | file_to_embed, | |
| const std::string | embedded_name, | |||
| const std::string & | binary_file, | |||
| std::string | section | |||
| ) |
Embeds the contents of the given file into the given section of a binary file.
| EDocBFD::BFDException |
|
Definition at line 264 of file bfd_utils.cpp.
References EDoc::CreateTempFilename(), EDOC_THROW_EXCEPTION, and EDoc::RunProgram().
Referenced by EDocBFD::ExtractedBFDFile::~ExtractedBFDFile().
| EDocBFD::HandleEDocSection | ( | bfd * | abfd, | |
| asection * | asect, | |||
| const EDoc::ManagedFile & | arch | |||
| ) |
Returns a list of temporary files that have been populated with the contents of an EDoc section.
Definition at line 178 of file bfd_utils.cpp.
References EDoc::CreateTempFilename(), EDOC_Debug, EDOC_Finest, EDOC_THROW_EXCEPTION, EDoc::Erase(), EDoc::ManagedFile::GetIdentifier(), EDocBFD::Section::IsEof(), and EDocBFD::Section::ReadEx().
Referenced by ProcessReadBFD().
| EDocBFD::InitialiseBFD | ( | ) |
Must be called before using any bfd related functions.
Definition at line 134 of file bfd_utils.cpp.
References bfd_initialised.
Referenced by EDocBFD::BFDArchive::BFDArchive(), and OpenBFDFile().
| EDocBFD::OpenBFDFile | ( | std::string | filename | ) |
Opens the given file using bfd.
| EDocBFD::BFDException |
|
Definition at line 143 of file bfd_utils.cpp.
References EDOC_Debug, EDOC_THROW_EXCEPTION, and InitialiseBFD().
Referenced by EDocBFD::BFDArchive::HandlesType(), and EDocBFD::BFDArchive::ReadExtractAll().
| EDocBFD::ProcessReadBFD | ( | std::list< EDoc::ManagedFile > & | input_files, | |
| struct bfd * | abfd, | |||
| const EDoc::ManagedFile & | filename | |||
| ) |
Reads the contens of a binary file and extracts all relevant EDoc information from them if there is any.
Definition at line 59 of file bfd_utils.cpp.
References EDoc::Append(), EDOC_Debug, EDOC_Fine, EDOC_SECTION_NAME, EDOC_THROW_EXCEPTION, EDoc::Erase(), EDoc::ManagedFile::GetFileNameRep(), and HandleEDocSection().
Referenced by EDocBFD::BFDArchive::ReadExtractAll().
| bool EDocBFD::bfd_initialised = false |
1.5.1