Skip to content
AdamFull edited this page Aug 7, 2021 · 3 revisions

EasyDelegate library wiki

Problem


The standard language library provides a mechanism for storing functional objects in std::function<> and binding by the std tool::bind migrated from boost. This mechanism has some disadvantages, especially with passing std:: placeholder as parameters of std:: bind.

Why is it necessary


This library makes working with delegates much easier. It allows you to create functional objects in the same way as std::function, but changes the mechanism for binding a function to a functional object. The delegate is based on std::function, it performs all the main work. EasyDelegate is an abstraction over std::function and implements a different function binding mechanism.


Classes

  • namespace EasyDelegate
    • class __Delegate
      Implementation of a simple delegate based on the std::function functionality from the c++ standard library. Allows you to implement a functional object of a class method or a static function for further invocation.
    • struct __DelegateAny
    • struct __DelegateAnyCT
      Implementation of global compile-time delegates. Not working for now.
    • class __DelegateMulti
      Implementation of the ability to store multiple delegates with the same signature inside a single structure with a user-friendly interface.
    • struct __EnumeratorComp
      Default comparator for the installed numerator.
    • struct __SignatureDesc
      A helper template for dividing a signature into a return type and a list of argument types.
    • struct __SignatureDesc< _ReturnType(Args...)>
      Specialization of the helper template for separating the method signature into a return type and an argument type sheet.

Clone this wiki locally