![]() |
ATLAS Offline Software
|
A smart pointer class that holds a single Sample object. More...
#include <SamplePtr.h>
Public Member Functions | |
| void | testInvariant () const |
| test the invariant of this object | |
| SamplePtr () | |
| standard constructor | |
| SamplePtr (Sample *val_sample) | |
| initializing constructor | |
| SamplePtr (std::unique_ptr< Sample > val_sample) | |
| initializing constructor | |
| SamplePtr (const SamplePtr &that) | |
| standard copy constructor | |
| SamplePtr (SamplePtr &&that) | |
| standard move constructor | |
| ~SamplePtr () | |
| standard destructor | |
| SamplePtr & | operator= (const SamplePtr &that) |
| standard assignment operator | |
| SamplePtr & | operator= (SamplePtr &&that) |
| standard move operator | |
| bool | empty () const |
| get() == 0 | |
| Sample * | get () |
| the sample itself | |
| const Sample * | get () const |
| the sample itself | |
| Sample * | operator-> () |
| the sample itself | |
| const Sample * | operator-> () const |
| the sample itself | |
| Sample & | operator* () |
| the sample itself | |
| const Sample & | operator* () const |
| the sample itself | |
Private Attributes | |
| Sample * | m_sample |
| the sample contained | |
A smart pointer class that holds a single Sample object.
To avoid various memory management issues, samples are usually held via such a smart pointer. Since the reference count is internal to the Sample object it is safe to assign the same Sample to multiple smart pointers.
Definition at line 34 of file SamplePtr.h.
| SH::SamplePtr::SamplePtr | ( | ) |
standard constructor
Definition at line 36 of file SamplePtr.cxx.
| SH::SamplePtr::SamplePtr | ( | Sample * | val_sample | ) |
initializing constructor
Definition at line 45 of file SamplePtr.cxx.
|
explicit |
initializing constructor
Definition at line 57 of file SamplePtr.cxx.
| SH::SamplePtr::SamplePtr | ( | const SamplePtr & | that | ) |
standard copy constructor
Definition at line 66 of file SamplePtr.cxx.
| SH::SamplePtr::SamplePtr | ( | SamplePtr && | that | ) |
| SH::SamplePtr::~SamplePtr | ( | ) |
standard destructor
Definition at line 89 of file SamplePtr.cxx.
| bool SH::SamplePtr::empty | ( | ) | const |
get() == 0
Definition at line 131 of file SamplePtr.cxx.
| Sample * SH::SamplePtr::get | ( | ) |
the sample itself
Definition at line 140 of file SamplePtr.cxx.
| const Sample * SH::SamplePtr::get | ( | ) | const |
the sample itself
Definition at line 148 of file SamplePtr.cxx.
| Sample & SH::SamplePtr::operator* | ( | ) |
the sample itself
Definition at line 177 of file SamplePtr.cxx.
| const Sample & SH::SamplePtr::operator* | ( | ) | const |
the sample itself
Definition at line 187 of file SamplePtr.cxx.
| Sample * SH::SamplePtr::operator-> | ( | ) |
the sample itself
Definition at line 157 of file SamplePtr.cxx.
| const Sample * SH::SamplePtr::operator-> | ( | ) | const |
the sample itself
Definition at line 167 of file SamplePtr.cxx.
standard assignment operator
Definition at line 100 of file SamplePtr.cxx.
standard move operator
Definition at line 116 of file SamplePtr.cxx.
| void SH::SamplePtr::testInvariant | ( | ) | const |
test the invariant of this object
Definition at line 29 of file SamplePtr.cxx.
|
private |
the sample contained
Definition at line 186 of file SamplePtr.h.