Fixed problem in DeviceSettings::strParam, returned wrong string
[avr-sim.git] / src / HexProgram.h
blob6f068d559fb912ca096bce76ebe63b18e05ad62c
1 #ifndef AVR_HEXPROGRAM_H
2 #define AVR_HEXPROGRAM_H
4 #include "Program.h"
5 #include <fstream>
7 namespace avr {
9 /**
10 * @author Tom Haber
11 * @date May 22, 2008
12 * @brief Support for the Intel Hex file format
14 * HexProgram is an implementation of a Program that
15 * can read Intel Hex format files as generated by
16 * avra and avr studio. This is usually also the format
17 * supplied to avrdude for programming.
19 class HexProgram : public Program {
20 public:
21 HexProgram();
22 HexProgram(const char *filename);
23 ~HexProgram();
25 public:
26 /**
27 * Opens and loads a file.
29 void load(const char * filename);
31 /**
32 * Reads the next available section from the file
33 * and returns the data in \e sec.
35 * \returns false if no further sections are available.
37 bool readNextSection(Section & sec);
39 private:
40 void loadSymbols();
42 private:
43 std::ifstream f;
44 bool end;
45 unsigned int offset;
48 inline HexProgram::HexProgram() : end(true) {}
49 inline HexProgram::HexProgram(const char *filename) : end(true) {
50 load( filename );
55 #endif /*AVR_HEXPROGRAM_H*/