CbcPointer< Cbc > Class Template Reference

#include <CbcPointer.h>

Inheritance diagram for CbcPointer< Cbc >:
Collaboration diagram for CbcPointer< Cbc >:

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
 
CbcPointeroperator= (const CbcPointer &p)
 
CbcPointeroperator= (CbcPointer &&)
 
template<typename Other >
 CbcPointer (const CbcPointer< Other > &o)
 support converting a child cbc pointer into a parent cbc pointer More...
 
template<typename Other >
CbcPointeroperator= (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

template<class Cbc>
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]

template<class Cbc >
CbcPointer< Cbc >::CbcPointer

Definition at line 86 of file CbcPointer.h.

◆ CbcPointer() [2/5]

template<class Cbc >
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]

template<class Cbc >
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]

template<class Cbc >
CbcPointer< Cbc >::CbcPointer ( CbcPointer< Cbc > &&  d)

Definition at line 105 of file CbcPointer.h.

◆ ~CbcPointer()

template<class Cbc >
CbcPointer< Cbc >::~CbcPointer

Definition at line 112 of file CbcPointer.h.

◆ CbcPointer() [5/5]

template<class Cbc >
template<typename Other >
CbcPointer< Cbc >::CbcPointer ( const CbcPointer< Other > &  o)
inline

Definition at line 50 of file CbcPointer.h.

References cbdataReference, CbcPointer< Cbc >::lock, and CbcPointer< Cbc >::valid().

Member Function Documentation

◆ clear()

◆ get()

◆ operator!()

template<class Cbc >
bool CbcPointer< Cbc >::operator! ( ) const
inline

Definition at line 42 of file CbcPointer.h.

References CbcPointer< Cbc >::valid().

◆ operator*()

template<class Cbc >
Cbc & CbcPointer< Cbc >::operator*

Definition at line 166 of file CbcPointer.h.

References assert.

◆ operator->()

template<class Cbc >
Cbc * CbcPointer< Cbc >::operator->

Definition at line 175 of file CbcPointer.h.

References assert.

◆ operator=() [1/3]

template<class Cbc >
CbcPointer< Cbc > & CbcPointer< Cbc >::operator= ( CbcPointer< Cbc > &&  d)

Definition at line 130 of file CbcPointer.h.

◆ operator=() [2/3]

template<class Cbc >
CbcPointer< Cbc > & CbcPointer< Cbc >::operator= ( const CbcPointer< Cbc > &  p)

◆ operator=() [3/3]

template<class Cbc >
template<typename Other >
CbcPointer & CbcPointer< Cbc >::operator= ( const CbcPointer< Other > &  o)
inline

◆ operator==()

template<class Cbc >
bool CbcPointer< Cbc >::operator== ( const CbcPointer< Cbc > &  o) const
inline

Definition at line 43 of file CbcPointer.h.

References CbcPointer< Cbc >::lock.

◆ print()

template<class Cbc >
std::ostream & CbcPointer< Cbc >::print ( std::ostream &  os) const

Definition at line 183 of file CbcPointer.h.

Referenced by operator<<().

◆ raw()

template<class Cbc >
Cbc * CbcPointer< Cbc >::raw

Definition at line 152 of file CbcPointer.h.

Referenced by CbcPointer< Cbc >::operator=().

◆ set()

◆ valid()

Member Data Documentation

◆ cbc

template<class Cbc >
Cbc* CbcPointer< Cbc >::cbc
private

◆ lock

template<class Cbc >
void* CbcPointer< Cbc >::lock
private

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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors