The srecord::input_filter_message class is used to represent an abstract base class for filters that must operate on the complete data, in order, in order to functions (e.g. More...
#include <message.h>
Public Member Functions | |
virtual | ~input_filter_message () |
The destructor. | |
![]() | |
virtual | ~input_filter () |
The destructor. | |
std::string | filename () const |
The filename method is used to get the name of the input file being processed. | |
std::string | filename_and_line () const |
The filename_and_line method is used to get the name and current line number within the file. | |
const char * | get_file_format_name () const |
The get_file_format_name method is used to find out the name of the file format being read. | |
void | disable_checksum_validation () |
The disable_checksum_validation method is used to have this input stream ignore checksum errors. | |
![]() | |
virtual | ~input () |
The destructor. | |
virtual void | fatal_error (const char *,...) const FORMAT_PRINTF(2 |
The fatal_error method is used to report problems parsing the file. | |
virtual void virtual void | fatal_error_errno (const char *,...) const FORMAT_PRINTF(2 |
The fatal_error_errno method is used to report problems reading the input file. | |
virtual void virtual void virtual void | warning (const char *,...) const FORMAT_PRINTF(2 |
The warning method is used to report potential (but non-fatal) problems parsing the file. | |
void | set_quit (quit &) |
The set_quit method is used to set the disposition of the error messages, and the "exit" implementation. | |
void | reset_quit (void) |
The reset_quit method is used to cause the disposition of the error messages, and the "exit" back to the default. | |
virtual void | command_line (srecord::arglex_tool *cmdln) |
The command_line method is used by arglex_srec::get_input when parsing the command line, to give a format or filter an opportunity to grab extra arguments off the command line. | |
Protected Member Functions | |
input_filter_message (const input::pointer &deeper, bool naked=false) | |
The constructor. | |
bool | read (record &record) |
The read method is used to read one record from the input. | |
virtual void | process (const memory &input, record &output)=0 |
The process method is used to process the data from the input. | |
virtual const char * | get_algorithm_name () const =0 |
The get_algorithm_name method is used in error messages. | |
virtual unsigned | get_minimum_alignment (void) const |
The get_minimum_alignment method is used to obtain the minium require dbyte alignment. | |
![]() | |
input_filter (input::pointer deeper) | |
The constructor. | |
![]() | |
input () | |
The default constructor. | |
Additional Inherited Members | |
![]() | |
typedef std::shared_ptr< input > | pointer |
![]() | |
pointer | ifp |
The srecord::input_filter_message class is used to represent an abstract base class for filters that must operate on the complete data, in order, in order to functions (e.g.
CRC, message digest, etc).
All of the machinery for accumulating the input data and eventually forwarding it on are in this common base class. The only methods that a derived class must supply are data block processing and results creation.
|
virtual |
The destructor.
|
protected |
The constructor.
deeper | The data to be filtered. |
naked | Whether or not to forward the data: true means result only with no data, false means result and data. |
Referenced by get_minimum_alignment().
|
protectedvirtual |
The read method is used to read one record from the input.
It returns 0 at the end of the input, and 1 if a record is read successfully.
See the srecord::record documentation (header file) for details of the various record types.
Note: there is no guarantee that a header record will appear first, or that a execution start address record will appear last.
rec | Where to put the returned data. |
Reimplemented from srecord::input_filter.
|
protectedpure virtual |
The process method is used to process the data from the input.
input | The memory representation to be processed. |
output | The filter's output. |
Implemented in srecord::input_filter_message_adler16, srecord::input_filter_message_adler32, srecord::input_filter_message_crc16, srecord::input_filter_message_crc32, srecord::input_filter_message_fletcher16, srecord::input_filter_message_fletcher32, srecord::input_filter_message_gcrypt, and srecord::input_filter_message_stm32.
|
protectedpure virtual |
The get_algorithm_name method is used in error messages.
Implemented in srecord::input_filter_message_adler16, srecord::input_filter_message_adler32, srecord::input_filter_message_crc16, srecord::input_filter_message_crc32, srecord::input_filter_message_fletcher16, srecord::input_filter_message_fletcher32, srecord::input_filter_message_gcrypt, and srecord::input_filter_message_stm32.
|
protectedvirtual |
The get_minimum_alignment method is used to obtain the minium require dbyte alignment.
Returns 0 if irrelevant.
Reimplemented in srecord::input_filter_message_stm32.
References input_filter_message().