1 #ifndef INCLUDE__InformationManager_hxx
2 #define INCLUDE__InformationManager_hxx
4 #include <boost/signals2.hpp>
15 class InformationManager {
17 ~InformationManager();
19 void reset(const std::string& filename);
20 void save(const QString& filename);
22 void signal_new_function(Function* f);
24 boost::signals2::connection
25 connect_new_function_signal(std::function<void(Function*)> f)
26 { return new_function_signal.connect(f); }
30 boost::signals2::connection
31 connect_new_dyn_symbol_signal(std::function<void(const std::string& name)> f)
32 { return new_dyn_symbol_signal.connect(f); }
34 void signal_new_dyn_symbol(const std::string& f)
35 { new_dyn_symbol_signal(f); }
37 boost::signals2::connection
38 connect_reset_signal(std::function<void ()> f)
39 { return reset_signal.connect(f); }
41 Disassembler* getDisassembler()
42 { return disassembler.get(); }
44 boost::signals2::signal<void ()> reset_signal;
45 boost::signals2::signal<void (Function*)> new_function_signal;
46 boost::signals2::signal<void (const std::string& name)> new_dyn_symbol_signal;
47 std::unique_ptr<Disassembler> disassembler;
48 std::set<Function*> functions;
49 std::set<BasicBlock*> blocks;
52 #endif /* INCLUDE__InformationManager_hxx */