WPILibC++ 2023.4.3
wpi::sig::Connection Class Reference

A Connection object allows interaction with an ongoing slot connection. More...

#include </home/runner/work/allwpilib/allwpilib/wpiutil/src/main/native/thirdparty/sigslot/include/wpi/Signal.h>

Inheritance diagram for wpi::sig::Connection:
wpi::sig::ScopedConnection

Public Member Functions

 Connection ()=default
 
virtual ~Connection ()=default
 
 Connection (const Connection &) noexcept=default
 
Connectionoperator= (const Connection &) noexcept=default
 
 Connection (Connection &&) noexcept=default
 
Connectionoperator= (Connection &&) noexcept=default
 
bool valid () const noexcept
 
bool connected () const noexcept
 
bool disconnect () noexcept
 
bool blocked () const noexcept
 
void block () noexcept
 
void unblock () noexcept
 
ConnectionBlocker blocker () const noexcept
 

Protected Member Functions

 Connection (std::weak_ptr< detail::SlotState > s) noexcept
 

Protected Attributes

std::weak_ptr< detail::SlotStatem_state
 

Friends

template<typename , typename... >
class SignalBase
 

Detailed Description

A Connection object allows interaction with an ongoing slot connection.

It allows common actions such as connection blocking and disconnection. Note that Connection is not a RAII object, one does not need to hold one such object to keep the signal-slot connection alive.

Constructor & Destructor Documentation

◆ Connection() [1/4]

wpi::sig::Connection::Connection ( )
default

◆ ~Connection()

virtual wpi::sig::Connection::~Connection ( )
virtualdefault

◆ Connection() [2/4]

wpi::sig::Connection::Connection ( const Connection )
defaultnoexcept

◆ Connection() [3/4]

wpi::sig::Connection::Connection ( Connection &&  )
defaultnoexcept

◆ Connection() [4/4]

wpi::sig::Connection::Connection ( std::weak_ptr< detail::SlotState s)
inlineprotectednoexcept

Member Function Documentation

◆ block()

void wpi::sig::Connection::block ( )
inlinenoexcept

◆ blocked()

bool wpi::sig::Connection::blocked ( ) const
inlinenoexcept

◆ blocker()

ConnectionBlocker wpi::sig::Connection::blocker ( ) const
inlinenoexcept

◆ connected()

bool wpi::sig::Connection::connected ( ) const
inlinenoexcept

◆ disconnect()

bool wpi::sig::Connection::disconnect ( )
inlinenoexcept

◆ operator=() [1/2]

Connection & wpi::sig::Connection::operator= ( Connection &&  )
defaultnoexcept

◆ operator=() [2/2]

Connection & wpi::sig::Connection::operator= ( const Connection )
defaultnoexcept

◆ unblock()

void wpi::sig::Connection::unblock ( )
inlinenoexcept

◆ valid()

bool wpi::sig::Connection::valid ( ) const
inlinenoexcept

Friends And Related Function Documentation

◆ SignalBase

template<typename , typename... >
friend class SignalBase
friend

Member Data Documentation

◆ m_state

std::weak_ptr<detail::SlotState> wpi::sig::Connection::m_state
protected

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