codefever / closure

a callback library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

INRODUCTION

A callback library with a small set of features from boost::function/boost::bind.

The C++ template code is not so complicated, which is generated by pump.py (from gtest/gmock). This script remove the repeated hard work for copying templates, but the code generated is still easy for reading.

I think someone would like callbacks in this way.

USAGE

See closure_test.cc.

Notice that there are two ways to create closure, NewClosure() and NewPermanentClosure(). Closures created by the former one will be deleted after the first call for Run(), and ones created by the latter one won't be deleted after every call for Run() which you should delete them by yourself.

About

a callback library


Languages

Language:C++ 100.0%