HepMC event record
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
include
HepMC
Data
include/HepMC/Data/SmartPointer.icc
1
/**
2
* @file SmartPointer.icc
3
* @brief Implementation of inline functions from \b class SmartPointer
4
*
5
*/
6
7
namespace
HepMC {
8
9
template
<
class
T>
10
SmartPointer<T>::SmartPointer
() {
11
}
12
13
template
<
class
T>
14
SmartPointer<T>::SmartPointer
(
const
SmartPointer<T> &rhs ):
15
m_data(rhs.m_data) {
16
}
17
18
template
<
class
T>
19
SmartPointer<T>::SmartPointer
(
const
shared_ptr<T> &rhs ):
20
m_data(rhs) {
21
if
(
m_data
)
m_data
->m_this =
m_data
;
22
}
23
24
template
<
class
T>
25
SmartPointer<T>::SmartPointer
( T *raw_pointer ) {
26
if
(raw_pointer) {
27
if
(raw_pointer->m_this.expired()) {
28
m_data.reset(raw_pointer);
29
m_data->m_this = m_data;
30
}
31
else
m_data = raw_pointer->m_this.lock();
32
}
33
}
34
35
}
// namespace HepMC
HepMC::SmartPointer::m_data
shared_ptr< T > m_data
Shared pointer.
Definition:
build/outputs/include/HepMC/Data/SmartPointer.h:131
HepMC::SmartPointer::SmartPointer
SmartPointer()
Default constructor (NULL pointer)
Definition:
build/outputs/include/HepMC/Data/SmartPointer.icc:10
Generated on Fri Jan 26 2018 13:01:00 for HepMC event record by
1.8.6