Giter Site home page Giter Site logo

gammasoft71 / delegates Goto Github PK

View Code? Open in Web Editor NEW
12.0 4.0 0.0 911 KB

Modern c ++17 library containing multicast delegate and event classes.

Home Page: https://gammasoft71.wixsilte.com/xtd-delegates

License: MIT License

CMake 9.28% Batchfile 1.30% Shell 4.23% C++ 84.80% C 0.39%
delegates delegate multicast cpp11 function functor lambda-functions event predicate action event-arguments event-handlers

delegates's Introduction

delegates

Modern c++17 library containing multicast delegate and event classes on Windows, macOS, Linux, iOS and android.

delegates

Continuous Integration build status

Operating system Status
Windows Build status
macOS Build Status
Linux Build Status

Features

  • Single and multicast delegate
  • event, event_args and event_handler are base classes for eventing.
  • action represents a delegate that has variable parameters and does not return a value.
  • func represents a delegate that has variables parameters and returns a value of the type specified by the result_t type.
  • predicate represents a delagate that defines a set of criteria and determines whether the specified object meets those criteria.
  • overload represents class that use to determine one of const and non const overloaded methods.

For more information see

Examples

The classic first application 'Hello World'.

delegates_hello_world.cpp:

#include <delegates/delegates>
#include <iostream>
#include <string>

using namespace std;
using namespace delegates;

int main() {
  delegate<void(const string& str)> write_line;
  
  write_line += [](const string& str)  {
    cout << str << endl;
  };
  
  write_line += [](auto str)  {
    cerr << str << endl;
  };
  
  write_line("Hello, world!");
}

CMakeLists.txt:

cmake_minimum_required(VERSION 3.3)

project(delegates_hello_world)
find_package(delegates REQUIRED)
add_executable(${PROJECT_NAME} delegates_hello_world.cpp)
target_link_libraries(${PROJECT_NAME} delegates)

Getting Started

  • Installation provides download and install documentation.
  • Portability provides information about C++, libraries dependency, Operating System suported, Compilators and Devepment Environment tools.
  • Examples provides some examples.

delegates's People

Contributors

gammasoft71 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.