{"id":13730732,"url":"https://github.com/larspensjo/SimpleSignal","last_synced_at":"2025-05-08T03:31:37.165Z","repository":{"id":58574611,"uuid":"14856431","full_name":"larspensjo/SimpleSignal","owner":"larspensjo","description":"High performance C++11 signals","archived":false,"fork":false,"pushed_at":"2019-07-24T10:57:35.000Z","size":22,"stargazers_count":160,"open_issues_count":0,"forks_count":42,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-08-04T02:09:47.926Z","etag":null,"topics":[],"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/larspensjo.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}},"created_at":"2013-12-02T08:12:37.000Z","updated_at":"2024-06-26T09:29:19.000Z","dependencies_parsed_at":"2022-09-16T08:11:51.581Z","dependency_job_id":null,"html_url":"https://github.com/larspensjo/SimpleSignal","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larspensjo%2FSimpleSignal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larspensjo%2FSimpleSignal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larspensjo%2FSimpleSignal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/larspensjo%2FSimpleSignal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/larspensjo","download_url":"https://codeload.github.com/larspensjo/SimpleSignal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224695678,"owners_count":17354452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-03T02:01:18.690Z","updated_at":"2024-11-14T21:31:32.194Z","avatar_url":"https://github.com/larspensjo.png","language":"C++","readme":"# High performance C++11 signals\nSee [Performance of a C++11 Signal System](http://www.testbit.eu/2013/cpp11-signal-system-performance/) for\nthe original source code, as well as performance measurements compared to other signalling systems.\n\nThe original author, Tim Janik, licensed the source code to the public domain [CC0 1.0 Universal (CC0 1.0)](http://creativecommons.org/publicdomain/zero/1.0/).\n## Declare a signal\nThis example declares a signal 'sig' that takes three arguments and returns a char.\n```c++\nSimple::Signal\u003cchar (float, int, std::string)\u003e sig;\n```\n## Connect to a signal\nThis example connects 'sig' to a static function.\nIt is also possible to connect to member functions or lambda functions.\n```c++\nstatic char float_callback (float f, int, std::string) {\n  // ...\n  return 0;\n}\n\nvoid Init() {\n  sig.connect(float_callback);\n}\n```\n## Fire a signal\n```c++\nvoid func() {\n  // ...\n  sig.emit(1.0f, 7, \"xxxx\");\n}\n```\n","funding_links":[],"categories":["Miscellaneous","C++","排序"],"sub_categories":["多项混杂"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarspensjo%2FSimpleSignal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flarspensjo%2FSimpleSignal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flarspensjo%2FSimpleSignal/lists"}