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

A notifiable class that calls a particular function object once when it is invoked, then deletes itself. More...

#include <Notifiable.hxx>

Inheritance diagram for TempNotifiable:
Notifiable Destructable

Public Member Functions

 TempNotifiable (std::function< void()> body)
 Constructor.
 
void notify () OVERRIDE
 Calls the notification method.
 

Private Attributes

std::function< void()> body_
 Function object (callback) to call.
 

Detailed Description

A notifiable class that calls a particular function object once when it is invoked, then deletes itself.

Definition at line 323 of file Notifiable.hxx.

Constructor & Destructor Documentation

◆ TempNotifiable()

TempNotifiable::TempNotifiable ( std::function< void()>  body)
inline

Constructor.

Parameters
bodyis the function object that will be called when *this is notified, just before *this is deleted.

Definition at line 328 of file Notifiable.hxx.

Member Function Documentation

◆ notify()

void TempNotifiable::notify ( )
inlinevirtual

Calls the notification method.

Implements Notifiable.

Definition at line 334 of file Notifiable.hxx.

Member Data Documentation

◆ body_

std::function<void()> TempNotifiable::body_
private

Function object (callback) to call.

Definition at line 342 of file Notifiable.hxx.


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