Sen API
Sen Libraries
Loading...
Searching...
No Matches
sen::ConnectionGuard Class Reference

Unregisters a callback on destruction, unless keep() is called. More...

#include <connection_guard.h>

Public Member Functions

 ConnectionGuard ()
 Constructs an emtpy guard.
 ~ConnectionGuard ()
 Removes the associated callback from the object if the object has not been destructed and keep() has not been called.
void keep () noexcept
 Tells this class to keep the callback even when this guard is destroyed.

Friends

class Object
template<typename... T>
class impl::EventBuffer

Detailed Description

Unregisters a callback on destruction, unless keep() is called.

Constructor & Destructor Documentation

◆ ConnectionGuard()

sen::ConnectionGuard::ConnectionGuard ( )

Constructs an emtpy guard.

◆ ~ConnectionGuard()

sen::ConnectionGuard::~ConnectionGuard ( )

Removes the associated callback from the object if the object has not been destructed and keep() has not been called.

Member Function Documentation

◆ keep()

void sen::ConnectionGuard::keep ( )
noexcept

Tells this class to keep the callback even when this guard is destroyed.

◆ Object

friend class Object
friend

◆ impl::EventBuffer

template<typename... T>
friend class impl::EventBuffer
friend

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