{"id":13424410,"url":"https://github.com/andsmedeiros/fuss","last_synced_at":"2025-05-10T17:30:48.104Z","repository":{"id":95480665,"uuid":"445170150","full_name":"andsmedeiros/fuss","owner":"andsmedeiros","description":"Efficient in-process pub/sub pattern for C++","archived":true,"fork":false,"pushed_at":"2022-01-11T15:09:58.000Z","size":5,"stargazers_count":15,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T21:46:22.797Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andsmedeiros.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-01-06T12:58:04.000Z","updated_at":"2025-03-01T23:16:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"c323b935-1d11-4446-8e65-d0e2f92fd008","html_url":"https://github.com/andsmedeiros/fuss","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/andsmedeiros%2Ffuss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andsmedeiros%2Ffuss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andsmedeiros%2Ffuss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andsmedeiros%2Ffuss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andsmedeiros","download_url":"https://codeload.github.com/andsmedeiros/fuss/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253453189,"owners_count":21911054,"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-07-31T00:00:53.982Z","updated_at":"2025-05-10T17:30:47.817Z","avatar_url":"https://github.com/andsmedeiros.png","language":"C++","readme":"# FUSS\n\nFUSS is a simple and efficient pub/sub pattern implementation aimed for C++17 programs with an intuitive interface. \nIt consists of a single header file and has no external dependencies.\n\n## Features\n\n- Simple, efficient, small and elegant. Just read the code!\n- Leverages modern C++ to provide an intuitive and pleasant API.\n- Avoids unnecessary dynamic memory as much as possible.\n- No virtual functions. \n- No RTTI. \n\n## Example\n\n```C++\n#include \u003cfuss.hpp\u003e\n\n// Define what messages are available to be published.\nstruct greeting : fuss::message\u003c\u003e {};\n\n// Note that messages can have parameters.\nstruct echo : fuss::message\u003cstd::string\u003e {};\n\n// Create a publisher object\nstruct noisy : fuss::shouter\u003cgreeting, echo\u003e {\n    void greet() {\n        // Publishes the `greeting` message.\n        // `shout()` is protected, so we create a member function to call it\n        shout\u003cgreeting\u003e();\n    }\n\n    void repeat(const std::string \u0026s) {\n        // Publishes the `echo` message with a string as parameter\n        shout\u003cecho\u003e(s);\n    }\n};\n\n// Instantiate the publisher\nnoisy n;\n\n// Subscribe to the messages\nauto greeting_listener = n.listen\u003cgreeting\u003e([]() {  \n    std::cout \u003c\u003c \"Hello world!\" \u003c\u003c std::endl;\n});\n\nn.listen\u003cecho\u003e([](std::string s) {\n    std::cout \u003c\u003c s \u003c\u003c std::endl;\n});\n\nn.greet(); // prints 'Hello world!'\nn.repeat(\"What a fuss!\"); // prints 'What a fuss!'\n\n// Unsubscribe from a message\nn.unlisten(greeting_listener);\n\nn.greet(); // doesn't print anything\n\n```\n\n## Copyright\n\nCopyright André Medeiros 2022\nContact: andre@setadesenvolvimentos.com.br","funding_links":[],"categories":["Concurrency"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandsmedeiros%2Ffuss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandsmedeiros%2Ffuss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandsmedeiros%2Ffuss/lists"}