20 #ifndef SRECORD_OUTPUT_FILE_H
21 #define SRECORD_OUTPUT_FILE_H
58 virtual const std::string
filename(
void)
const;
342 std::string file_name;
406 unsigned long position;
420 void set_is_regular(
void);
438 virtual bool is_binary(
void)
const;
The srecord::output_file class is used to represent a generic output file.
void put_string(const std::string &text)
The put_string method is used to send C++ string to the output.
virtual void put_4bytes_be(unsigned long value)
The put_4bytes_be method is used to send a 32-bit value to the output.
static void enable_goto_addr(bool yesno)
The enable_goto_addr class method is used to enable or disable the writing of execution start address...
static line_termination_t line_termination
The line_termination class variable is used to remember the desired line termination style.
static bool enable_data_count_flag
The enable_data_count_flag class variable is set by the enable_data_count method, to remember whether...
void data_address_too_large(const record &record, unsigned nbits) const
The data_address_too_large method is used to report fatal problems with data records,...
int checksum
The checksum instance variable is used record the running checksum.
void static bool enable_header_flag
The enable_header_flag class variable is set by the enable_header method, to remember whether or not ...
void fatal_alignment_error(int alignment)
The fatal_alignment_error method is used to report problems with unaligned data in formats that requi...
int checksum_get(void)
The checksum_get method is used to get the current value of the running checksum (added to by the che...
static line_termination_t line_termination_guess(void)
The line_termination_guess class method is used to figure out the line termination style of the host ...
void seek_to(unsigned long)
The seek_to method is used to move the output position to the specified location in the output file.
static bool enable_optional_address_flag
The enable_optional_address_records class variable is used to remember whether or not to emit optiona...
static bool enable_by_name(const std::string &name, bool yesno)
The enable_by_name class method is used to enable or disable the writing of various records into outp...
static void enable_data_count(bool yesno)
The enable_data_count class method is used to enable or disable the writing of data record count reco...
static void enable_header(bool yesno)
The enable_header class method is used to enable or disable the writing of header records into output...
virtual void put_3bytes_be(unsigned long value)
The put_3bytes_be method is used to send a 24-bit value to the output.
virtual void put_4bytes_le(unsigned long value)
The put_4bytes_le method is used to send a 32-bit value to the output.
@ line_termination_native
@ line_termination_binary
@ line_termination_primos
static bool line_termination_by_name(const std::string &name)
The line_termination_by_name method is used to force line termination to a particular style,...
virtual void put_char(int c)
The put_char method is used to send a character to the output.
static bool enable_footer_flag
The enable_footer_flag class variable is set by the enable_footer method, to remember whether or not ...
void checksum_reset(void)
The checksum_reset method is used to set the running checksum to zero.
void put_nibble(int value)
The put_nibble method is used to send a hexadecimal digit (0..9, A..F) to the output.
virtual void put_3bytes_le(unsigned long value)
The put_3bytes_le method is used to send a 24-bit value to the output.
int checksum_get16(void)
The checksum_get16 method is used to get the current value of the running checksum (added to by the c...
output_file()
The default constructor.
void fatal_hole_error(unsigned long lo, unsigned long hi)
The fatal_hole_error method is used to report problems with holes in the data, for formats that canno...
void put_stringf(const char *,...) FORMAT_PRINTF(2
The put_stringf method is used to send a formatted string to the output.
virtual void put_word_le(int value)
The put_word_le method is used to send a 16-bit value to the output.
static bool enable_goto_addr_flag
The enable_goto_addr_flag class variable is set by the enable_goto_addr method, to remember whether o...
static void enable_optional_address(bool yesno)
The enable_footer class method is used to enable or disable emitting optional address records.
virtual void put_byte(unsigned char value)
The put_byte method is used to send a byte value to the output.
virtual void put_word_be(int value)
The put_word_be method is used to send a 16-bit value to the output.
virtual void checksum_add(unsigned char n)
The checksum_add method is used to add another 8-bit value to the running checksum.
virtual ~output_file()
The destructor.
virtual const std::string filename(void) const
The filename method is used to determine the name of the output file.
static void enable_footer(bool yesno)
The enable_footer class method is used to enable or disable the writing of footer records into output...
void put_string(const char *text)
The put_string method is used to send a nul-terminated C string to the output.
output_file(const std::string &file_name)
The constructor.
The srecord::output class is used to represent an abstract output vector.
The srecord::record class is used to represent a data record read from a file.