Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
FnExecutable Class Reference

Helper class to run a lambda in the main executor. More...

#include <test_main.hxx>

Inheritance diagram for FnExecutable:
Executable Notifiable QMember Destructable

Public Member Functions

 FnExecutable (std::function< void()> &&fn)
 
void run () OVERRIDE
 Entry point.
 
- Public Member Functions inherited from Executable
void test_deletion ()
 
void notify () override
 Crashes the program – everyone who is expecting notify calls must override this function.
 
virtual void alloc_result (QMember *item)
 Return the result of an alloc_async() from a memory Pool.
 
- Public Member Functions inherited from QMember
void init ()
 Initiailize a QMember, in place of a public placement construction.
 

Public Attributes

SyncNotifiable n
 

Private Attributes

std::function< void()> fn_
 

Additional Inherited Members

- Protected Member Functions inherited from QMember
 QMember ()
 Constructor.
 
 ~QMember ()
 Destructor.
 
- Protected Attributes inherited from QMember
QMembernext
 pointer to the next member in the queue
 

Detailed Description

Helper class to run a lambda in the main executor.

Definition at line 169 of file test_main.hxx.

Constructor & Destructor Documentation

◆ FnExecutable()

FnExecutable::FnExecutable ( std::function< void()> &&  fn)
inline

Definition at line 172 of file test_main.hxx.

Member Function Documentation

◆ run()

void FnExecutable::run ( )
inlinevirtual

Entry point.

This funciton will be called when *this gets scheduled on the CPU.

Implements Executable.

Definition at line 177 of file test_main.hxx.

Member Data Documentation

◆ fn_

std::function<void()> FnExecutable::fn_
private

Definition at line 186 of file test_main.hxx.

◆ n

SyncNotifiable FnExecutable::n

Definition at line 183 of file test_main.hxx.


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