The output_filter class is used to represent a generic output manipulation. More...
#include <filter.h>
Public Member Functions | |
virtual | ~output_filter () |
The destructor. | |
![]() | |
virtual | ~output () |
The destructor. | |
virtual void | write_header (const record *=0) |
The write_header method is used to write a header record to the output. | |
virtual void | write_data (unsigned long, const void *, size_t) |
The write_data method is used to write data to the output. | |
virtual void | write_execution_start_address (const record *=0) |
The write_execution_start_address method is used to write an execution start address record to the output. | |
virtual void | fatal_error (const char *fmt,...) const FORMAT_PRINTF(2 |
The fatal_error method is used to report fatal errors. | |
virtual void virtual void | fatal_error_v (const char *fmt, va_list ap) const |
The fatal_error_v method is used to report fatal errors. | |
virtual void | fatal_error_errno (const char *fmt,...) const FORMAT_PRINTF(2 |
The fatal_error_errno method is used to report fatal errors, and append the string equivalent of errno. | |
virtual void virtual void | fatal_error_errno_v (const char *fmt, va_list ap) const |
The fatal_error_errno_v method is used to report fatal errors. | |
virtual void | warning (const char *fmt,...) const FORMAT_PRINTF(2 |
The warning method is used to likely but non-fatal errors. | |
virtual void virtual void | warning_v (const char *fmt, va_list ap) const |
The warning_v method is used to report likely but non-fatal errors. | |
Protected Member Functions | |
output_filter (const output::pointer &deeper) | |
The constructor. | |
void | write (const record &r) |
The write method is used to write a recordonto an output. | |
void | line_length_set (int) |
The set_line_length method is used to set the maximum length of an output line, for those formats for which this is a meaningful concept, and the line length is at all controllable. | |
void | address_length_set (int) |
The address_length_set method is used to set the minimum number of bytes to be written for addresses in the output, for those formats for which this is a meaningful concept, and the address length is at all controllable. | |
int | preferred_block_size_get () const |
The preferred_block_size_get method is used to get the proferred block size of the output fformat. | |
bool | preferred_block_size_set (int nbytes) |
The preferred_block_size_set method is is to set a precific number of bytes for the preferred block size. | |
const std::string | filename () const |
The filename method is used to determine the name of the output file. | |
const char * | format_name () const |
The format_name method is used to obtain the name of this output format. | |
void | notify_upper_bound (unsigned long addr) |
The notify_upper_bound method is used to notify the output class of the upper bound (highest address plus one) of the output to come. | |
void | command_line (arglex_tool *cmdln) |
The command_line method is used by arglex_srec::get_output when parsing the command line, to give the format an opportunity to grab extra arguments off the command line. | |
![]() | |
output () | |
The default constructor. | |
Additional Inherited Members | |
![]() | |
typedef std::shared_ptr< output > | pointer |
The output_filter class is used to represent a generic output manipulation.
Usually the major manipulations are done on input, these filters are output-specific.
|
virtual |
The destructor.
|
protected |
The constructor.
For use by derived classes only.
deeper | Where to send our filtered output. |
Referenced by command_line().
|
protectedvirtual |
The write method is used to write a recordonto an output.
Derived classes must implement this method.
rec | The record to be written. |
Implements srecord::output.
Reimplemented in srecord::output_filter_reblock.
|
protectedvirtual |
The set_line_length method is used to set the maximum length of an output line, for those formats for which this is a meaningful concept, and the line length is at all controllable.
Derived classes must implement this method.
cols | The page width in fixed width text columns. |
Implements srecord::output.
Reimplemented in srecord::output_filter_reblock.
|
protectedvirtual |
The address_length_set method is used to set the minimum number of bytes to be written for addresses in the output, for those formats for which this is a meaningful concept, and the address length is at all controllable.
Derived classes must implement this method.
nbytes | The number of byte to use for the address (2..4). |
Implements srecord::output.
Reimplemented in srecord::output_filter_reblock.
|
protectedvirtual |
The preferred_block_size_get method is used to get the proferred block size of the output fformat.
Often, but not always, influenced by the line_lebgth_set method. Derived classes must implement this method.
Implements srecord::output.
Reimplemented in srecord::output_filter_reblock.
|
protectedvirtual |
The preferred_block_size_set method is is to set a precific number of bytes for the preferred block size.
nbytes | The exact number of bytes to be returned by the preferred_block_size_get method. |
Implements srecord::output.
Reimplemented in srecord::output_filter_reblock.
|
protectedvirtual |
The filename method is used to determine the name of the output file.
It is used for the various error messages. Derived classes must implement this method.
Implements srecord::output.
|
protectedvirtual |
The format_name method is used to obtain the name of this output format.
Implements srecord::output.
|
protectedvirtual |
The notify_upper_bound method is used to notify the output class of the upper bound (highest address plus one) of the output to come.
Shall be called before the head or any data records are written.
addr | One past the highest used memory byte. |
Reimplemented from srecord::output.
|
protectedvirtual |
The command_line method is used by arglex_srec::get_output when parsing the command line, to give the format an opportunity to grab extra arguments off the command line.
The default implementation does nothing.
cmdln | Where to obtain information about the curreent parse stat of the command line. |
Reimplemented from srecord::output.
References output_filter().