#ifndef _recentfiles__hpp__included__ #define _recentfiles__hpp__included__ #include #include #include class recent_files { public: struct hook { virtual ~hook(); virtual void operator()() = 0; }; recent_files(const std::string& cfgfile, size_t maxcount); void add(const std::string& file); void add_hook(hook& h); void remove_hook(hook& h); std::list get(); private: std::string cfgfile; size_t maxcount; std::list hooks; }; #endif