WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::util::sig::Connection Class Reference

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

#include <wpi/util/Signal.h>

Inheritance diagram for wpi::util::sig::Connection:
wpi::util::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::util::sig::Connection::Connection ( )
default

◆ ~Connection()

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

◆ Connection() [2/4]

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

◆ Connection() [3/4]

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

◆ Connection() [4/4]

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

Member Function Documentation

◆ block()

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

◆ blocked()

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

◆ blocker()

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

◆ connected()

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

◆ disconnect()

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ unblock()

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

◆ valid()

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

◆ SignalBase

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

Member Data Documentation

◆ m_state

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

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