9#ifndef SQUID_CBC_POINTER_H
10#define SQUID_CBC_POINTER_H
40 bool set()
const {
return cbc !=
nullptr; }
49 template <
typename Other>
56 template <
typename Other>
69 std::ostream &
print(std::ostream &os)
const;
185 return os << cbc <<
'/' << lock;
std::ostream & operator<<(std::ostream &os, const CbcPointer< Cbc > &p)
int cbdataReferenceValid(const void *p)
#define cbdataReferenceDone(var)
#define cbdataReference(var)
Cbc * valid() const
was set and is valid
CbcPointer(const CbcPointer &p)
void clear()
make pointer not set; does not invalidate cbdata
bool operator!() const
invalid or was not set
Cbc * get() const
a temporary valid raw Cbc pointer or NULL
Cbc * operator->() const
a valid Cbc pointer or exception
CbcPointer(CbcPointer &&)
std::ostream & print(std::ostream &os) const
CbcPointer & operator=(const CbcPointer &p)
Cbc & operator*() const
a valid Cbc reference or exception
bool operator==(const CbcPointer< Cbc > &o) const
bool set() const
was set but may be invalid
Cbc * raw() const
a temporary raw Cbc pointer; may be invalid
CbcPointer(const CbcPointer< Other > &o)
support converting a child cbc pointer into a parent cbc pointer