Skip to content

A naive implementation of delegates to member functions in c++

Notifications You must be signed in to change notification settings

GiovanniZambiasi/cpp-delegates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Gio's C++ Delegates

A naive header-only implementation of delegates in c++. Insipred by the Unreal Engine delegate system. For anyone looking to do the same, I recommend these two articles:

My goals were to:

  • Make it as simple, and with as clean a syntax as possible
  • Be able to bind any functions to it, including:
    • Member functions
    • Static member functions
    • Global functions
    • Lambdas
  • Support any number of parameters

Installing:

To use, simply include /GioDelegates/Delegate.h

Usage:

TBD...
You can find all examples here /GioDelegates/GioDelegateExamples.cpp

To-do

  • Unbind specific delegate (via handle?)
  • Remove by object

About

A naive implementation of delegates to member functions in c++

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages