{"id":16385004,"url":"https://github.com/saber2pr/eventdispatcher-cpp","last_synced_at":"2026-06-23T11:31:32.271Z","repository":{"id":108570268,"uuid":"161050472","full_name":"Saber2pr/EventDispatcher-cpp","owner":"Saber2pr","description":null,"archived":false,"fork":false,"pushed_at":"2018-12-13T07:59:03.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-29T09:16:37.897Z","etag":null,"topics":["cpp","event"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Saber2pr.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-09T14:57:49.000Z","updated_at":"2018-12-13T07:59:04.000Z","dependencies_parsed_at":"2023-04-20T21:33:42.398Z","dependency_job_id":null,"html_url":"https://github.com/Saber2pr/EventDispatcher-cpp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Saber2pr/EventDispatcher-cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saber2pr%2FEventDispatcher-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saber2pr%2FEventDispatcher-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saber2pr%2FEventDispatcher-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saber2pr%2FEventDispatcher-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Saber2pr","download_url":"https://codeload.github.com/Saber2pr/EventDispatcher-cpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saber2pr%2FEventDispatcher-cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34686727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","event"],"created_at":"2024-10-11T04:13:20.507Z","updated_at":"2026-06-23T11:31:32.242Z","avatar_url":"https://github.com/Saber2pr.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EventDispatcher-cpp\n\u003e Subscribe/Publish\n\n```cpp\nvoid EventDispatcher::addEventListener(string name, Listener listener){\n    Event event;\n    event.name = name;\n    event.listener = listener;\n    this-\u003eEventList.push_back(event);\n}\n\nvoid EventDispatcher::dispatchEvent(string name, Message value){\n    for_each(this-\u003eEventList.begin(), this-\u003eEventList.end(), [=](Event event){\n        event.name == name? event.listener(value): void();\n    });\n}\n\nvoid EventDispatcher::removeEventListener(string name){\n    vector\u003cEvent\u003e event_filtered(this-\u003eEventList.size());\n    auto end = copy_if(this-\u003eEventList.begin(), this-\u003eEventList.end(), event_filtered.begin(), [=](Event event_cur){\n        return event_cur.name == name? false: true;\n    });\n    event_filtered.resize(distance(event_filtered.begin(), end));\n    this-\u003eEventList = event_filtered;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaber2pr%2Feventdispatcher-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaber2pr%2Feventdispatcher-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaber2pr%2Feventdispatcher-cpp/lists"}