ATLAS Offline Software
Type.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id$
6 /**
7  * @file RootUtils/Type.icc
8  * @author scott snyder <snyder@bnl.gov>
9  * @date Jun, 2014
10  * @brief Wrapper for ROOT types.
11  */
12 
13 
14 namespace RootUtils {
15 
16 
17 /**
18  * @brief Default constructor.
19  */
20 inline
21 Type::Deleter::Deleter()
22  : m_t (0)
23 {
24 }
25 
26 
27 /**
28  * @brief Constructor.
29  * @param t The type describing this generic pointer.
30  */
31 inline
32 Type::Deleter::Deleter (const Type& t)
33  : m_t (&t)
34 {
35 }
36 
37 
38 /**
39  * @brief Delete an object.
40  * @param p Pointer to the object to delete.
41  */
42 inline
43 void Type::Deleter::operator() (void* p)
44 {
45  m_t->destroy (p);
46 }
47 
48 
49 } // namespace RootUtils