Skip to content

Conversation

@kpraveenkumar
Copy link

Template class to explicitly construct a function object and execute the function object with arguments using parameter pack. C++17 has invoke feature which executes any callable with any number of arguments using parameter pack.

EventSystem has interfaces which allows to register functions and Execute the function based on event id which is generated during registration or Execute all functions based on Event type.

I tried std::vector<std::function<void, void (*)(void *)>> as common storage/generic callable container for all callable and give a generic event id for all events to invoke again but faced issue in reinterpret_cast of callable.

enum class is used to ensure type safety

@kpraveenkumar kpraveenkumar changed the title WIP: Event System Design Event System Design Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant