#include <include/EDocBFD/Section.h>
Definition at line 35 of file Section.h.
Public Member Functions | |
Section (bfd *abfd_in, asection *asect_in) | |
Create an instance for the given section of the bfd. | |
ssize_t | Write (unsigned char data) |
Write a char of data to the section. | |
ssize_t | Write (const void *data, size_t len) |
Write data to the given section. | |
std::string | Read (size_t max_size=0xFFFFFFFF) |
Read data from the section. | |
std::string | ReadEx (size_t max_size=0xFFFFFFFF) |
Read data from the section. | |
ssize_t | Read (void *sectbuf, size_t max_size) |
Read data from the section. | |
ssize_t | ReadEx (void *sectbuf, size_t max_size) |
Read data from the section. | |
bool | IsEof () const |
Return true if at the end of the sections data. | |
Private Attributes | |
bfd * | abfd |
The bfd. | |
asection * | asect |
The bfds section object. | |
size_t | file_pos |
The location of the file pointer in the sections data. | |
size_t | sectsize |
The total size of the section. |
EDocBFD::Section::Section | ( | bfd * | abfd_in, | |
asection * | asect_in | |||
) |
Create an instance for the given section of the bfd.
Definition at line 36 of file Section.cpp.
EDocBFD::Section::Write | ( | unsigned char | data | ) |
Write a char of data to the section.
EDoc::EOFException |
| |
EDocBFD::BFDException |
|
Definition at line 46 of file Section.cpp.
EDocBFD::Section::Write | ( | const void * | data, | |
size_t | len | |||
) |
Write data to the given section.
EDoc::EOFException |
| |
EDocBFD::BFDException |
|
Definition at line 51 of file Section.cpp.
References abfd, asect, EDOC_THROW_EXCEPTION, file_pos, and sectsize.
EDocBFD::Section::Read | ( | size_t | max_size = 0xFFFFFFFF |
) |
Read data from the section.
EDoc::EOFException |
| |
EDocBFD::BFDException |
|
Definition at line 75 of file Section.cpp.
References file_pos, and sectsize.
Referenced by ReadEx().
EDocBFD::Section::ReadEx | ( | size_t | max_size = 0xFFFFFFFF |
) |
Read data from the section.
EDoc::EOFException |
| |
EDocBFD::BFDException |
|
Definition at line 147 of file Section.cpp.
References asect, EDOC_THROW_EXCEPTION, file_pos, Read(), and sectsize.
Referenced by EDocBFD::HandleEDocSection().
EDocBFD::Section::Read | ( | void * | sectbuf, | |
size_t | max_size | |||
) |
Read data from the section.
EDoc::EOFException |
| |
EDocBFD::BFDException |
|
Definition at line 112 of file Section.cpp.
References abfd, asect, EDOC_THROW_EXCEPTION, file_pos, and sectsize.
EDocBFD::Section::ReadEx | ( | void * | sectbuf, | |
size_t | max_size | |||
) |
Read data from the section.
EDoc::EOFException |
| |
EDocBFD::BFDException |
|
Definition at line 163 of file Section.cpp.
References asect, EDOC_THROW_EXCEPTION, file_pos, Read(), and sectsize.
EDocBFD::Section::IsEof | ( | ) | const [inline] |
Return true if at the end of the sections data.
Definition at line 77 of file Section.h.
References file_pos, and sectsize.
Referenced by EDocBFD::HandleEDocSection().
bfd* EDocBFD::Section::abfd [private] |
asection* EDocBFD::Section::asect [private] |
size_t EDocBFD::Section::file_pos [private] |
size_t EDocBFD::Section::sectsize [private] |