From c9cbeced5b3f2bdd7407e29c0811e65954132540 Mon Sep 17 00:00:00 2001 From: Root THC Date: Tue, 24 Feb 2026 12:42:47 +0000 Subject: initial --- other/Kermit/include/SystemMap.hpp | 61 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 other/Kermit/include/SystemMap.hpp (limited to 'other/Kermit/include/SystemMap.hpp') diff --git a/other/Kermit/include/SystemMap.hpp b/other/Kermit/include/SystemMap.hpp new file mode 100644 index 0000000..ff59094 --- /dev/null +++ b/other/Kermit/include/SystemMap.hpp @@ -0,0 +1,61 @@ +/* + * SystemMap.hpp: + * representation if a system map file (and alike). + * written by palmers / teso + */ +#ifndef SYSTEM_MAP_C +#define SYSTEM_MAP_C + +#include +#include +#include + +/** + * Representation of a System.map file. It maps names to addresses. + */ +class SystemMap +{ +private: + typedef map blamap; + typedef blamap::value_type bla_val; + + blamap add_map; + +public: +/** + * Create a SystemMap object and read symbol names and addresses from a file. + */ + SystemMap (string file); + +/** + * Create a SystemMap object and leave it empty. + */ + SystemMap (); + +/** + * Foo. + */ + ~SystemMap (); + +/** + * Check if a symbol (by name) is part of the object. + * @return true if the questioned symbol is part of the object (else false). + */ + bool contains (string); + +/** + * Add a name, address pair to the object. + * @param name Symbolname. If a symbol with this name already exists + * it will not be added. + * @param address the address of the symbol. + */ + void add (string name, unsigned int address); + +/** + * Random access operator for accessing elements in the form x = []. + * @param name of a symbol. + * @return the address of symbol name. + */ + unsigned int operator[] (string name); +}; +#endif /* SYSTEM_MAP_C */ -- cgit v1.3