Evo C++ Library v0.5.1
Public Types | Public Member Functions | List of all members
EventLambda Class Reference

#include <evo/event.h>

Inheritance diagram for EventLambda:
Inheritance graph
[legend]

Detailed Description

Implement Event using a lambda function (C++11).

Public Types

typedef std::function< bool()> Lambda
 Lambda function type for Event. More...
 

Public Member Functions

 EventLambda (const Lambda &lambda)
 Constructor. More...
 
 EventLambda (const EventLambda &src)
 Copy constructor. More...
 
bool operator() ()
 Event function. More...
 
EventLambdaoperator= (const EventLambda &src)
 Assignment operator. More...
 

Member Typedef Documentation

◆ Lambda

typedef std::function<bool()> Lambda

Lambda function type for Event.

Constructor & Destructor Documentation

◆ EventLambda() [1/2]

EventLambda ( const Lambda lambda)
inline

Constructor.

Parameters
lambdaLambda to use

◆ EventLambda() [2/2]

EventLambda ( const EventLambda src)
inline

Copy constructor.

Parameters
srcSource to copy

Member Function Documentation

◆ operator()()

bool operator() ( )
inlinevirtual

Event function.

  • This is called by EventQueue to process the event
  • The return value identifies whether the caller should free this object
  • Caution: This must not throw any exception
Returns
Whether event is finished and ready to be freed, false if ownership was transferred elsewhere

Implements Event.

◆ operator=()

EventLambda& operator= ( const EventLambda src)
inline

Assignment operator.

Parameters
srcSource to copy
Returns
This

The documentation for this class was generated from the following file: