srecord
1.65.0
|
The srecord::output class is used to represent an abstract output vector. More...
#include <output.h>
Public Types | |
typedef std::shared_ptr< output > | pointer |
Public Member Functions | |
virtual | ~output () |
The destructor. More... | |
virtual void | write (const record &rec)=0 |
The write method is used to write a recordonto an output. More... | |
virtual void | write_header (const record *=0) |
The write_header method is used to write a header record to the output. More... | |
virtual void | write_data (unsigned long, const void *, size_t) |
The write_data method is used to write data to the output. More... | |
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. More... | |
virtual void | line_length_set (int cols)=0 |
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. More... | |
virtual void | address_length_set (int nbytes)=0 |
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. More... | |
virtual int | preferred_block_size_get (void) const =0 |
The preferred_block_size_get method is used to get the proferred block size of the output fformat. More... | |
virtual bool | preferred_block_size_set (int nbytes)=0 |
The preferred_block_size_set method is is to set a precific number of bytes for the preferred block size. More... | |
virtual void | fatal_error (const char *fmt,...) const FORMAT_PRINTF(2 |
The fatal_error method is used to report fatal errors. More... | |
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. More... | |
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. More... | |
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. More... | |
virtual void | warning (const char *fmt,...) const FORMAT_PRINTF(2 |
The warning method is used to likely but non-fatal errors. More... | |
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. More... | |
virtual const std::string | filename (void) const =0 |
The filename method is used to determine the name of the output file. More... | |
virtual const char * | format_name (void) const =0 |
The format_name method is used to obtain the name of this output format. More... | |
virtual 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. More... | |
virtual 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. More... | |
Protected Member Functions | |
output () | |
The default constructor. More... | |
The srecord::output class is used to represent an abstract output vector.
It could be a file, it could be a filter first, before it reaches a file.
typedef std::shared_ptr<output> srecord::output::pointer |
|
virtual |
The destructor.
|
protected |
The default constructor.
Only derived classes may use.
|
pure virtual |
The write method is used to write a recordonto an output.
Derived classes must implement this method.
rec | The record to be written. |
Implemented in srecord::output_file_idt, srecord::output_filter_reblock, srecord::output_filter, srecord::output_file_wilson, srecord::output_file_vmem, srecord::output_file_vhdl, srecord::output_file_trs80, srecord::output_file_ti_txt, srecord::output_file_ti_tagged_16, srecord::output_file_ti_tagged, srecord::output_file_tektronix_extended, srecord::output_file_tektronix, srecord::output_file_stewie, srecord::output_file_spectrum, srecord::output_file_spasm, srecord::output_file_signetics, srecord::output_file_ppx, srecord::output_file_ppb, srecord::output_file_os65v, srecord::output_file_needham, srecord::output_file_msbin, srecord::output_file_motorola, srecord::output_file_mos_tech, srecord::output_file_mips_flash, srecord::output_file_mif, srecord::output_file_mem, srecord::output_file_logisim, srecord::output_file_intel16, srecord::output_file_intel, srecord::output_file_hexdump, srecord::output_file_four_packed_code, srecord::output_file_forth, srecord::output_file_formatted_binary, srecord::output_file_fastload, srecord::output_file_fairchild, srecord::output_file_emon52, srecord::output_file_dec_binary, srecord::output_file_cosmac, srecord::output_file_coe, srecord::output_file_c, srecord::output_file_brecord, srecord::output_file_binary, srecord::output_file_basic, srecord::output_file_atmel_generic, srecord::output_file_asm, srecord::output_file_ascii_hex, and srecord::output_file_aomf.
|
virtual |
The write_header method is used to write a header record to the output.
If no record is specified, a default record will be supplied. The write method will be called.
|
virtual |
The write_data method is used to write data to the output.
A suitable data record wil be produced. The write method will be called.
|
virtual |
The write_execution_start_address method is used to write an execution start address record to the output.
If no record is specified, a default record will be supplied. The write method will be called.
|
pure virtual |
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. |
Implemented in srecord::output_filter_reblock, srecord::output_filter, srecord::output_file_wilson, srecord::output_file_vmem, srecord::output_file_vhdl, srecord::output_file_trs80, srecord::output_file_ti_txt, srecord::output_file_ti_tagged_16, srecord::output_file_ti_tagged, srecord::output_file_tektronix_extended, srecord::output_file_tektronix, srecord::output_file_stewie, srecord::output_file_spectrum, srecord::output_file_spasm, srecord::output_file_signetics, srecord::output_file_ppx, srecord::output_file_ppb, srecord::output_file_os65v, srecord::output_file_needham, srecord::output_file_msbin, srecord::output_file_motorola, srecord::output_file_mos_tech, srecord::output_file_mips_flash, srecord::output_file_mif, srecord::output_file_mem, srecord::output_file_logisim, srecord::output_file_intel16, srecord::output_file_intel, srecord::output_file_idt, srecord::output_file_hexdump, srecord::output_file_four_packed_code, srecord::output_file_forth, srecord::output_file_formatted_binary, srecord::output_file_fastload, srecord::output_file_fairchild, srecord::output_file_emon52, srecord::output_file_dec_binary, srecord::output_file_cosmac, srecord::output_file_coe, srecord::output_file_c, srecord::output_file_brecord, srecord::output_file_binary, srecord::output_file_basic, srecord::output_file_atmel_generic, srecord::output_file_asm, srecord::output_file_ascii_hex, and srecord::output_file_aomf.
|
pure virtual |
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). |
Implemented in srecord::output_filter_reblock, srecord::output_filter, srecord::output_file_wilson, srecord::output_file_vmem, srecord::output_file_vhdl, srecord::output_file_trs80, srecord::output_file_ti_txt, srecord::output_file_ti_tagged_16, srecord::output_file_ti_tagged, srecord::output_file_tektronix_extended, srecord::output_file_tektronix, srecord::output_file_stewie, srecord::output_file_spectrum, srecord::output_file_spasm, srecord::output_file_signetics, srecord::output_file_ppx, srecord::output_file_ppb, srecord::output_file_os65v, srecord::output_file_needham, srecord::output_file_msbin, srecord::output_file_motorola, srecord::output_file_mos_tech, srecord::output_file_mips_flash, srecord::output_file_mif, srecord::output_file_mem, srecord::output_file_logisim, srecord::output_file_intel16, srecord::output_file_intel, srecord::output_file_hexdump, srecord::output_file_four_packed_code, srecord::output_file_forth, srecord::output_file_formatted_binary, srecord::output_file_fastload, srecord::output_file_fairchild, srecord::output_file_emon52, srecord::output_file_dec_binary, srecord::output_file_cosmac, srecord::output_file_coe, srecord::output_file_c, srecord::output_file_brecord, srecord::output_file_binary, srecord::output_file_basic, srecord::output_file_atmel_generic, srecord::output_file_asm, srecord::output_file_ascii_hex, srecord::output_file_aomf, and srecord::output_file_idt.
|
pure virtual |
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.
Implemented in srecord::output_filter_reblock, srecord::output_file_ppx, srecord::output_file_ppb, srecord::output_file_motorola, srecord::output_file_mips_flash, srecord::output_file_mem, srecord::output_file_logisim, srecord::output_file_intel, srecord::output_file_idt, srecord::output_file_hexdump, srecord::output_file_coe, srecord::output_file_aomf, srecord::output_filter, srecord::output_file_wilson, srecord::output_file_vmem, srecord::output_file_vhdl, srecord::output_file_trs80, srecord::output_file_ti_txt, srecord::output_file_ti_tagged_16, srecord::output_file_ti_tagged, srecord::output_file_tektronix_extended, srecord::output_file_tektronix, srecord::output_file_stewie, srecord::output_file_spectrum, srecord::output_file_spasm, srecord::output_file_signetics, srecord::output_file_os65v, srecord::output_file_needham, srecord::output_file_msbin, srecord::output_file_mos_tech, srecord::output_file_mif, srecord::output_file_intel16, srecord::output_file_four_packed_code, srecord::output_file_forth, srecord::output_file_formatted_binary, srecord::output_file_fastload, srecord::output_file_fairchild, srecord::output_file_emon52, srecord::output_file_dec_binary, srecord::output_file_cosmac, srecord::output_file_c, srecord::output_file_brecord, srecord::output_file_binary, srecord::output_file_basic, srecord::output_file_atmel_generic, srecord::output_file_asm, and srecord::output_file_ascii_hex.
|
pure virtual |
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. |
Implemented in srecord::output_filter_reblock, srecord::output_filter, srecord::output_file_wilson, srecord::output_file_vmem, srecord::output_file_vhdl, srecord::output_file_trs80, srecord::output_file_ti_txt, srecord::output_file_ti_tagged_16, srecord::output_file_ti_tagged, srecord::output_file_tektronix_extended, srecord::output_file_tektronix, srecord::output_file_stewie, srecord::output_file_spectrum, srecord::output_file_spasm, srecord::output_file_signetics, srecord::output_file_ppx, srecord::output_file_ppb, srecord::output_file_os65v, srecord::output_file_needham, srecord::output_file_msbin, srecord::output_file_motorola, srecord::output_file_mos_tech, srecord::output_file_mips_flash, srecord::output_file_mif, srecord::output_file_mem, srecord::output_file_logisim, srecord::output_file_intel16, srecord::output_file_intel, srecord::output_file_idt, srecord::output_file_hexdump, srecord::output_file_four_packed_code, srecord::output_file_forth, srecord::output_file_formatted_binary, srecord::output_file_fastload, srecord::output_file_fairchild, srecord::output_file_emon52, srecord::output_file_dec_binary, srecord::output_file_cosmac, srecord::output_file_coe, srecord::output_file_c, srecord::output_file_brecord, srecord::output_file_binary, srecord::output_file_basic, srecord::output_file_atmel_generic, srecord::output_file_asm, srecord::output_file_ascii_hex, and srecord::output_file_aomf.
|
virtual |
The fatal_error method is used to report fatal errors.
The 'fmt' string is in the same style a standard C printf function. It calls the fatal_error_v method. This method does not return.
|
virtual |
The fatal_error_v method is used to report fatal errors.
The 'fmt' string is in the same style a standard C vprintf function. It calls global exit. This method does not return.
|
virtual |
The fatal_error_errno method is used to report fatal errors, and append the string equivalent of errno.
The 'fmt' string is in the same style a standard C printf function. It calls global exit(). This method does not return.
|
virtual |
The fatal_error_errno_v method is used to report fatal errors.
The 'fmt' string is in the same style a standard C vprintf function. It calls the global exit function. This method does not return.
|
virtual |
The warning method is used to likely but non-fatal errors.
The 'fmt' string is in the same style a standard C printf function. It calls the warning_v method.
|
virtual |
The warning_v method is used to report likely but non-fatal errors.
The 'fmt' string is in the same style a standard C vprintf function.
|
pure virtual |
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.
Implemented in srecord::output_file, and srecord::output_filter.
|
pure virtual |
The format_name method is used to obtain the name of this output format.
Implemented in srecord::output_file_ppx, srecord::output_file_ppb, srecord::output_file_motorola, srecord::output_file_mips_flash, srecord::output_file_mem, srecord::output_file_logisim, srecord::output_file_intel, srecord::output_file_idt, srecord::output_file_hexdump, srecord::output_file_coe, srecord::output_file_aomf, srecord::output_filter, srecord::output_file_wilson, srecord::output_file_vmem, srecord::output_file_vhdl, srecord::output_file_trs80, srecord::output_file_ti_txt, srecord::output_file_ti_tagged_16, srecord::output_file_ti_tagged, srecord::output_file_tektronix_extended, srecord::output_file_tektronix, srecord::output_file_stewie, srecord::output_file_spectrum, srecord::output_file_spasm, srecord::output_file_signetics, srecord::output_file_os65v, srecord::output_file_needham, srecord::output_file_msbin, srecord::output_file_mos_tech, srecord::output_file_mif, srecord::output_file_intel16, srecord::output_file_four_packed_code, srecord::output_file_forth, srecord::output_file_formatted_binary, srecord::output_file_fastload, srecord::output_file_fairchild, srecord::output_file_emon52, srecord::output_file_dec_binary, srecord::output_file_cosmac, srecord::output_file_c, srecord::output_file_brecord, srecord::output_file_binary, srecord::output_file_basic, srecord::output_file_atmel_generic, srecord::output_file_asm, and srecord::output_file_ascii_hex.
|
virtual |
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 in srecord::output_filter, srecord::output_file_msbin, srecord::output_file_mif, srecord::output_file_mem, and srecord::output_file_coe.
|
virtual |
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 in srecord::output_filter, srecord::output_file_vmem, srecord::output_file_vhdl, srecord::output_file_motorola, srecord::output_file_mif, srecord::output_file_mem, srecord::output_file_hexdump, srecord::output_file_forth, srecord::output_file_coe, srecord::output_file_c, and srecord::output_file_asm.