ATLAS Offline Software
|
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the const case only a const pointer is returned The class takes the ownership of the object using a shared_ptr. More...
#include <TransientConstSharedPtr.h>
Public Member Functions | |
Obj * | get () |
Get (non-const) access to the underlying object. More... | |
Obj * | operator-> () |
const Obj * | get () const |
Get const access to the underlying object. More... | |
const Obj * | operator-> () const |
const Obj & | operator* () const |
Dereference operator. More... | |
Obj & | operator* () |
template<typename ObjGrp > | |
TransientConstSharedPtr (std::unique_ptr< ObjGrp > ptr) | |
Constructor from unique_ptr. More... | |
template<typename ObjGrp > | |
TransientConstSharedPtr (std::shared_ptr< ObjGrp > ptr) | |
Constructor from shared_ptr. More... | |
TransientConstSharedPtr (Obj *ptr) | |
Constructor from raw ptr. More... | |
TransientConstSharedPtr ()=default | |
Standard constructor. More... | |
template<typename ObjGrp > | |
TransientConstSharedPtr (const TransientConstSharedPtr< ObjGrp > &other) | |
Delete the copy constructor if the object is const. More... | |
template<typename ObjGrp > | |
TransientConstSharedPtr (TransientConstSharedPtr< ObjGrp > &&other) | |
Standard move constructor. More... | |
template<typename ObjGrp > | |
TransientConstSharedPtr & | operator= (const TransientConstSharedPtr< ObjGrp > &other) |
Assignment operator. More... | |
template<typename ObjGrp > | |
TransientConstSharedPtr & | operator= (const std::shared_ptr< ObjGrp > &other) |
template<typename ObjGrp > | |
TransientConstSharedPtr & | operator= (TransientConstSharedPtr< ObjGrp > &&other) |
Move assignment operator. More... | |
template<typename ObjGrp > | |
TransientConstSharedPtr & | operator= (std::unique_ptr< ObjGrp > &&other) |
template<typename ObjGrp > | |
TransientConstSharedPtr & | operator= (std::shared_ptr< ObjGrp > &&other) |
template<typename ObjGrp > | |
void | reset (std::unique_ptr< ObjGrp > newObj) |
Overload the pointer. More... | |
void | reset () |
std::shared_ptr< const Obj > | release () |
Release the memory. More... | |
operator bool () const | |
Is the pointer defined. More... | |
bool | operator! () const |
size_t | use_count () const |
How many clients does the pointer have. More... | |
bool | operator< (const TransientConstSharedPtr &other) const |
Smaller operator to insert the pointer into sets. More... | |
Private Attributes | |
std::shared_ptr< Obj > | m_ptr {} |
Friends | |
template<typename ObjGrp > | |
class | GeoModel::TransientConstSharedPtr |
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the const case only a const pointer is returned The class takes the ownership of the object using a shared_ptr.
Definition at line 13 of file TransientConstSharedPtr.h.
|
inline |
Constructor from unique_ptr.
Definition at line 28 of file TransientConstSharedPtr.h.
|
inline |
Constructor from shared_ptr.
Definition at line 31 of file TransientConstSharedPtr.h.
|
inline |
Constructor from raw ptr.
Definition at line 33 of file TransientConstSharedPtr.h.
|
default |
Standard constructor.
|
inline |
Delete the copy constructor if the object is const.
Definition at line 39 of file TransientConstSharedPtr.h.
|
inline |
Standard move constructor.
Definition at line 43 of file TransientConstSharedPtr.h.
|
inline |
Get (non-const) access to the underlying object.
Definition at line 17 of file TransientConstSharedPtr.h.
|
inline |
|
inline |
|
inline |
Definition at line 83 of file TransientConstSharedPtr.h.
|
inline |
Definition at line 24 of file TransientConstSharedPtr.h.
|
inline |
|
inline |
Definition at line 18 of file TransientConstSharedPtr.h.
|
inline |
Definition at line 21 of file TransientConstSharedPtr.h.
|
inline |
Smaller operator to insert the pointer into sets.
Definition at line 88 of file TransientConstSharedPtr.h.
|
inline |
Definition at line 55 of file TransientConstSharedPtr.h.
|
inline |
Assignment operator.
Definition at line 48 of file TransientConstSharedPtr.h.
|
inline |
Definition at line 71 of file TransientConstSharedPtr.h.
|
inline |
Definition at line 66 of file TransientConstSharedPtr.h.
|
inline |
Move assignment operator.
Definition at line 61 of file TransientConstSharedPtr.h.
|
inline |
|
inline |
Definition at line 78 of file TransientConstSharedPtr.h.
|
inline |
|
inline |
|
friend |
Definition at line 15 of file TransientConstSharedPtr.h.
|
private |
Definition at line 91 of file TransientConstSharedPtr.h.