LLDB  mainline
Public Member Functions | List of all members
lldb_private::CleanUp Class Reference

Run a cleanup function on scope exit unless it's explicitly disabled. More...

#include <CleanUp.h>

Public Member Functions

template<typename F , typename... Args>
 CleanUp (F &&Func, Args &&... args)
 Register a cleanup function which applies Func to a list of arguments. More...
 
 ~CleanUp ()
 
void disable ()
 Disable the cleanup. More...
 
 DISALLOW_COPY_AND_ASSIGN (CleanUp)
 

Detailed Description

Run a cleanup function on scope exit unless it's explicitly disabled.

Definition at line 18 of file CleanUp.h.

Constructor & Destructor Documentation

◆ CleanUp()

template<typename F , typename... Args>
lldb_private::CleanUp::CleanUp ( F &&  Func,
Args &&...  args 
)
inline

Register a cleanup function which applies Func to a list of arguments.

Use caution with arguments which are references: they will be copied.

Definition at line 25 of file CleanUp.h.

◆ ~CleanUp()

lldb_private::CleanUp::~CleanUp ( )
inline

Definition at line 28 of file CleanUp.h.

Member Function Documentation

◆ disable()

void lldb_private::CleanUp::disable ( )
inline

Disable the cleanup.

Definition at line 34 of file CleanUp.h.

References DISALLOW_COPY_AND_ASSIGN().

Referenced by lldb_private::process_gdb_remote::ProcessGDBRemote::LaunchAndConnectToDebugserver().

◆ DISALLOW_COPY_AND_ASSIGN()

lldb_private::CleanUp::DISALLOW_COPY_AND_ASSIGN ( CleanUp  )

Referenced by disable().


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