Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - larspensjo/SimpleSignal: High performance C++11 signals

High performance C++11 signals. Contribute to larspensjo/SimpleSignal development by creating an account on GitHub.

Visit SiteGitHub - larspensjo/SimpleSignal: High performance C++11 signals

GitHub - larspensjo/SimpleSignal: High performance C++11 signals

High performance C++11 signals. Contribute to larspensjo/SimpleSignal development by creating an account on GitHub.

Powered by 0x5a.live ๐Ÿ’—

High performance C++11 signals

See Performance of a C++11 Signal System for the original source code, as well as performance measurements compared to other signalling systems.

The original author, Tim Janik, licensed the source code to the public domain CC0 1.0 Universal (CC0 1.0).

Declare a signal

This example declares a signal 'sig' that takes three arguments and returns a char.

Simple::Signal<char (float, int, std::string)> sig;

Connect to a signal

This example connects 'sig' to a static function. It is also possible to connect to member functions or lambda functions.

static char float_callback (float f, int, std::string) {
  // ...
  return 0;
}

void Init() {
  sig.connect(float_callback);
}

Fire a signal

void func() {
  // ...
  sig.emit(1.0f, 7, "xxxx");
}

C++ Programming Resources

are all listed below.

Resources

listed to get explored on!!

Made with โค๏ธ

to provide different kinds of informations and resources.