uvco 0.1
Loading...
Searching...
No Matches
uvco::OnExit Class Reference

#include <util.h>

Public Member Functions

 OnExit (std::function< void()> &&func)
 ~OnExit ()
 OnExit (const OnExit &)=delete
 OnExit (OnExit &&)=delete
OnExitoperator= (const OnExit &)=delete
OnExitoperator= (OnExit &&)=delete

Private Attributes

std::function< void()> func_

Constructor & Destructor Documentation

◆ OnExit() [1/3]

uvco::OnExit::OnExit ( std::function< void()> && func)
inlineexplicit
15: func_{std::move(func)} {}
std::function< void()> func_
Definition util.h:30

◆ ~OnExit()

uvco::OnExit::~OnExit ( )
inline
17 {
18 if (func_) {
19 func_();
20 }
21 }

◆ OnExit() [2/3]

uvco::OnExit::OnExit ( const OnExit & )
delete

◆ OnExit() [3/3]

uvco::OnExit::OnExit ( OnExit && )
delete

Member Function Documentation

◆ operator=() [1/2]

OnExit & uvco::OnExit::operator= ( const OnExit & )
delete

◆ operator=() [2/2]

OnExit & uvco::OnExit::operator= ( OnExit && )
delete

Member Data Documentation

◆ func_

std::function<void()> uvco::OnExit::func_
private

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