FinallyOnce< T > Class Template Reference

#include <finally.h>

公共成员函数

MAXON_IMPLICIT   FinallyOnce ( FinallyOnce && src )
MAXON_IMPLICIT   FinallyOnce (T &&lambda)
  ~FinallyOnce ()
  MAXON_OPERATOR_MOVE_ASSIGNMENT ( FinallyOnce )
void  禁用 ()
void  启用 ()
std::result_of< T()>::type  operator() ()

私有成员函数

  MAXON_DISALLOW_COPY_AND_ASSIGN ( FinallyOnce )

Private Attributes

_lambda
Bool   _isEnabled

构造函数 & 析构函数文档编制

◆  FinallyOnce() [1/2]

MAXON_IMPLICIT FinallyOnce ( FinallyOnce < T > &&  src )

◆  FinallyOnce() [2/2]

MAXON_IMPLICIT FinallyOnce ( T &&  lambda )

◆  ~FinallyOnce()

~ FinallyOnce ( )

成员函数文档编制

◆  MAXON_DISALLOW_COPY_AND_ASSIGN()

MAXON_DISALLOW_COPY_AND_ASSIGN ( FinallyOnce < T >  )
private

◆  MAXON_OPERATOR_MOVE_ASSIGNMENT()

MAXON_OPERATOR_MOVE_ASSIGNMENT ( FinallyOnce < T >  )

◆  Disable()

void Disable ( )

Disables the invocation of the lambda.

◆  Enable()

void Enable ( )

Enables the invocation of the lambda.

◆  operator()()

std::result_of<T()>::type operator() ( )

Member Data Documentation

◆  _lambda

T _lambda private

◆  _isEnabled

Bool _isEnabled
private