#include <CbcPointer.h>
Public Member Functions | |
CbcPointer () | |
CbcPointer (Cbc *aCbc) | |
CbcPointer (const CbcPointer &p) | |
CbcPointer (CbcPointer &&) | |
~CbcPointer () | |
Cbc * | raw () const |
a temporary raw Cbc pointer; may be invalid More... | |
Cbc * | get () const |
a temporary valid raw Cbc pointer or NULL More... | |
Cbc & | operator* () const |
a valid Cbc reference or exception More... | |
Cbc * | operator-> () const |
a valid Cbc pointer or exception More... | |
bool | set () const |
was set but may be invalid More... | |
Cbc * | valid () const |
was set and is valid More... | |
bool | operator! () const |
invalid or was not set More... | |
bool | operator== (const CbcPointer< Cbc > &o) const |
CbcPointer & | operator= (const CbcPointer &p) |
CbcPointer & | operator= (CbcPointer &&) |
template<typename Other > | |
CbcPointer (const CbcPointer< Other > &o) | |
support converting a child cbc pointer into a parent cbc pointer More... | |
template<typename Other > | |
CbcPointer & | operator= (const CbcPointer< Other > &o) |
support assigning a child cbc pointer to a parent cbc pointer More... | |
void | clear () |
make pointer not set; does not invalidate cbdata More... | |
std::ostream & | print (std::ostream &os) const |
Private Attributes | |
Cbc * | cbc |
void * | lock |
Detailed Description
class CbcPointer< Cbc >
Safely points to a cbdata-protected class (cbc), such as an AsyncJob. When a cbc we communicate with disappears without notice or a notice has not reached us yet, this class prevents dereferencing the pointer to the gone cbc object.
Definition at line 25 of file CbcPointer.h.
Constructor & Destructor Documentation
◆ CbcPointer() [1/5]
CbcPointer< Cbc >::CbcPointer |
Definition at line 86 of file CbcPointer.h.
◆ CbcPointer() [2/5]
CbcPointer< Cbc >::CbcPointer | ( | Cbc * | aCbc | ) |
Definition at line 91 of file CbcPointer.h.
References CbcPointer< Cbc >::cbc, cbdataReference, and CbcPointer< Cbc >::lock.
◆ CbcPointer() [3/5]
CbcPointer< Cbc >::CbcPointer | ( | const CbcPointer< Cbc > & | p | ) |
Definition at line 98 of file CbcPointer.h.
References cbdataReference, cbdataReferenceValid(), and CbcPointer< Cbc >::lock.
◆ CbcPointer() [4/5]
CbcPointer< Cbc >::CbcPointer | ( | CbcPointer< Cbc > && | d | ) |
Definition at line 105 of file CbcPointer.h.
◆ ~CbcPointer()
CbcPointer< Cbc >::~CbcPointer |
Definition at line 112 of file CbcPointer.h.
◆ CbcPointer() [5/5]
|
inline |
Definition at line 50 of file CbcPointer.h.
References cbdataReference, CbcPointer< Cbc >::lock, and CbcPointer< Cbc >::valid().
Member Function Documentation
◆ clear()
void CbcPointer< Cbc >::clear |
Definition at line 144 of file CbcPointer.h.
References cbdataReferenceDone.
Referenced by JobWaitBase::clear(), Adaptation::Initiator::clearAdaptation(), BodyPipe::clearConsumer(), BodyPipe::clearProducer(), FwdState::connectedToPeer(), IpCacheLookupForwarder::finalCallback(), FwdState::noteConnection(), TunnelStateData::noteConnection(), TunnelStateData::noteSecurityPeerConnectorAnswer(), CbcPointer< Cbc >::operator=(), FwdState::tunnelEstablishmentDone(), and TunnelStateData::tunnelEstablishmentDone().
◆ get()
Cbc * CbcPointer< Cbc >::get |
Definition at line 159 of file CbcPointer.h.
References cbdataReferenceValid().
Referenced by Security::EncryptorAnswer::~EncryptorAnswer(), HappyConnOpenerAnswer::~HappyConnOpenerAnswer(), Http::TunnelerAnswer::~TunnelerAnswer(), Format::Format::assemble(), FwdState::connectedToPeer(), copyResultsFromEntry(), UnaryCbdataDialer< Argument1 >::dial(), PeerSelector::handlePath(), Adaptation::Icap::Xaction::handleSecuredPeer(), PeerPoolMgr::handleSecuredPeer(), netdbExchangeHandleReply(), FwdState::noteConnection(), TunnelStateData::noteConnection(), TunnelStateData::noteSecurityPeerConnectorAnswer(), Http::operator<<(), peerDigestRequest(), HttpRequest::pinnedConnection(), JobWaitBase::print(), Ftp::Relay::sendCommand(), ACLFilledChecklist::setRequest(), JobWaitBase::start_(), BodyPipe::status(), Ftp::Relay::stopOriginWait(), switchToTunnel(), tunnelConnectedWriteDone(), FwdState::tunnelEstablishmentDone(), TunnelStateData::tunnelEstablishmentDone(), Ftp::Relay::updateMaster(), and CbcPointer< Cbc >::valid().
◆ operator!()
|
inline |
Definition at line 42 of file CbcPointer.h.
References CbcPointer< Cbc >::valid().
◆ operator*()
Cbc & CbcPointer< Cbc >::operator* |
Definition at line 166 of file CbcPointer.h.
References assert.
◆ operator->()
Cbc * CbcPointer< Cbc >::operator-> |
Definition at line 175 of file CbcPointer.h.
References assert.
◆ operator=() [1/3]
CbcPointer< Cbc > & CbcPointer< Cbc >::operator= | ( | CbcPointer< Cbc > && | d | ) |
Definition at line 130 of file CbcPointer.h.
◆ operator=() [2/3]
CbcPointer< Cbc > & CbcPointer< Cbc >::operator= | ( | const CbcPointer< Cbc > & | p | ) |
Definition at line 118 of file CbcPointer.h.
References CbcPointer< Cbc >::cbc, cbdataReference, cbdataReferenceValid(), and CbcPointer< Cbc >::lock.
◆ operator=() [3/3]
|
inline |
Definition at line 57 of file CbcPointer.h.
References CbcPointer< Cbc >::cbc, cbdataReference, CbcPointer< Cbc >::clear(), CbcPointer< Cbc >::lock, CbcPointer< Cbc >::raw(), and CbcPointer< Cbc >::valid().
◆ operator==()
|
inline |
Definition at line 43 of file CbcPointer.h.
References CbcPointer< Cbc >::lock.
◆ print()
std::ostream & CbcPointer< Cbc >::print | ( | std::ostream & | os | ) | const |
Definition at line 183 of file CbcPointer.h.
Referenced by operator<<().
◆ raw()
Cbc * CbcPointer< Cbc >::raw |
Definition at line 152 of file CbcPointer.h.
Referenced by CbcPointer< Cbc >::operator=().
◆ set()
|
inline |
Definition at line 40 of file CbcPointer.h.
References CbcPointer< Cbc >::cbc.
Referenced by BodyPipe::clearConsumer(), BodyPipe::clearProducer(), IpCacheLookupForwarder::finalCallback(), IpCacheLookupForwarder::forwardHits(), IpCacheLookupForwarder::forwardIp(), IpCacheLookupForwarder::forwardLookup(), Adaptation::Initiator::initiated(), operator<<(), peerDigestCheck(), BodyPipe::setConsumerIfNotLate(), and BodyPipe::status().
◆ valid()
|
inline |
Definition at line 41 of file CbcPointer.h.
References CbcPointer< Cbc >::get().
Referenced by CbcPointer< Cbc >::CbcPointer(), Ssl::PeekingPeerConnector::PeekingPeerConnector(), Format::Format::assemble(), UnaryCbcCallbackDialer< Destination, Argument1 >::canDial(), UnaryCbdataDialer< Argument1 >::canDial(), TunnelStateData::clientExpectsConnectResponse(), FwdState::completed(), TunnelStateData::deleteThis(), downloaderRecipient(), IpCacheLookupForwarder::finalCallback(), IpCacheLookupForwarder::forwardIp(), IpCacheLookupForwarder::forwardLookup(), Adaptation::Initiate::initiator(), PeerSelector::interestedInitiator(), Comm::AcceptLimiter::kick(), HttpRequest::manager(), netdbExchangeHandleReply(), PeerSelector::noteIp(), PeerSelector::noteIps(), PconnPool::notifyManager(), CbcPointer< Cbc >::operator!(), CbcPointer< Cbc >::operator=(), peerAlive(), peerDigestCheck(), peerDigestFetchedEnough(), peerDNSConfigure(), HttpRequest::pinnedConnection(), HttpStateData::processReplyBody(), PeerSelector::resolveSelected(), BodyPipe::scheduleBodyDataNotification(), BodyPipe::scheduleBodyEndNotification(), Ftp::Relay::sendCommand(), Ftp::Relay::serverComplete(), JobWaitBase::start_(), BodyPipe::startAutoConsumptionIfNeeded(), Ftp::Relay::stopOriginWait(), tunnelStartShoveling(), and Ftp::Relay::updateMaster().
Member Data Documentation
◆ cbc
|
private |
Definition at line 72 of file CbcPointer.h.
Referenced by CbcPointer< Cbc >::CbcPointer(), CbcPointer< Cbc >::operator=(), and CbcPointer< Cbc >::set().
◆ lock
|
private |
Definition at line 73 of file CbcPointer.h.
Referenced by CbcPointer< Cbc >::CbcPointer(), CbcPointer< Cbc >::operator=(), and CbcPointer< Cbc >::operator==().
The documentation for this class was generated from the following files:
- src/base/AsyncJob.h
- src/base/CbcPointer.h