Skip to content

pajlada/signals

Repository files navigation

codecov

signals

simple C++ signal library

Usage

pajlada::Signals::Signal<int, int> s;

uint64_t cX = s.connect([](int a, int b) {
    cout << "X " << a << ", " << b << endl;  //
});

// prints X 0, 1
s.invoke(0, 1);

s.disconnect(cX);

// prints nothing
s.invoke(1, 2);
    

Development

# Create build dir
mkdir build
cd build

cmake \
    -DPAJLADA_SIGNALS_BUILD_TESTS=On \
    -DPAJLADA_SIGNALS_BUILD_COVERAGE=On \
    ..

# Build
cmake --build .

# Run tests
ctest

# Generate coverage
make coverage

# Open generated coverage in your browser
firefox tests/coverage/index.html

About

simple C++ signal library

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors