Skip to content

TutorialBasic

Dmitry Koplyarov edited this page Feb 10, 2016 · 4 revisions

Table of contents

Hello, World!

void HelloWorld()
{
	std::cout << "Hello, World!" << std::endl;
}

// ...

// A signal with no arguments
wigwag::signal<void()> s;

// Connecting to the signal
wigwag::token t = s.connect(&HelloWorld);

// Invoking the signal
s();

There are two essential classes in wigwag: signal and token. The first is apparently the signal itself, and the second represents a connection between a handler and a signal. The handler remains connected to a signal while the token object is alive.

Clone this wiki locally