aboutsummaryrefslogtreecommitdiff
path: root/src/cmake_config.h.in
Commit message (Collapse)AuthorAge
* Improved win32 file version informationsapier2014-03-02
|
* Handle LuaErrors in Lua -> C++ calls on LuaJITShadowNinja2013-12-18
|
* Show git hash in version string at top left corner of windowKahrl2013-09-28
|
* Add curl, freetype and luaJIT to CMAKE_BUILD_INFOPilzAdam2013-09-28
|
* Add dummy and LevelDB database backendsIlya Zhuravlev2013-09-09
|
* Add Freetype supportIlya Zhuravlev2013-02-14
|
* Added ability to fetch media from remote server (using cURL library)Ilya Zhuravlev2012-12-16
|
* Improve build configuration optionsPerttu Ahola2012-07-23
|
* Build configuration fixes/improvements on WindowsPerttu Ahola2012-03-25
|
* Update/fix/improve config.h and cmake_config.h.inPerttu Ahola2012-03-24
|
* Actually make USE_GETTEXT available in the sourceGiuseppe Bilotta2011-07-24
|
* Place project name and gettext use in configGiuseppe Bilotta2011-07-24
|
* cleaning notes and stuffPerttu Ahola2011-04-06
|
* made old build system to work too. the cmake one doesn't make working ↵Perttu Ahola2011-01-18
binaries for some computers. --HG-- rename : src/config.h.in => src/cmake_config.h.in
ss="hl kwc">std::string, Dest> m_dest; public: ~EventManager() { } void put(MtEvent *e) { std::map<std::string, Dest>::iterator i = m_dest.find(e->getType()); if(i != m_dest.end()){ std::list<FuncSpec> &funcs = i->second.funcs; for(std::list<FuncSpec>::iterator i = funcs.begin(); i != funcs.end(); ++i){ (*(i->f))(e, i->d); } } delete e; } void reg(const char *type, event_receive_func f, void *data) { std::map<std::string, Dest>::iterator i = m_dest.find(type); if(i != m_dest.end()){ i->second.funcs.push_back(FuncSpec(f, data)); } else{ std::list<FuncSpec> funcs; Dest dest; dest.funcs.push_back(FuncSpec(f, data)); m_dest[type] = dest; } } void dereg(const char *type, event_receive_func f, void *data) { if(type != NULL){ std::map<std::string, Dest>::iterator i = m_dest.find(type); if(i != m_dest.end()){ std::list<FuncSpec> &funcs = i->second.funcs; std::list<FuncSpec>::iterator j = funcs.begin(); while(j != funcs.end()){ bool remove = (j->f == f && (!data || j->d == data)); if(remove) funcs.erase(j++); else ++j; } } } else{ for(std::map<std::string, Dest>::iterator i = m_dest.begin(); i != m_dest.end(); ++i){ std::list<FuncSpec> &funcs = i->second.funcs; std::list<FuncSpec>::iterator j = funcs.begin(); while(j != funcs.end()){ bool remove = (j->f == f && (!data || j->d == data)); if(remove) funcs.erase(j++); else ++j; } } } } void reg(MtEventReceiver *r, const char *type) { reg(type, EventManager::receiverReceive, r); } void dereg(MtEventReceiver *r, const char *type) { dereg(type, EventManager::receiverReceive, r); } }; #endif