ATLAS Offline Software
Public Member Functions | Protected Types | Protected Attributes | Static Private Member Functions | List of all members
pool::DbObjectSet< T > Class Template Reference

#include <src/DbObjectSet.h>

Inheritance diagram for pool::DbObjectSet< T >:
Collaboration diagram for pool::DbObjectSet< T >:

Public Member Functions

 DbObjectSet ()
 Constructor. More...
 
 DbObjectSet (dtor_t)
 Constructor with destroy function. More...
 
virtual ~DbObjectSet ()
 Standard destructor. More...
 
void add (T *pObj)
 Add object to set. More...
 
void remove (T *pObj)
 Remove single object from set. More...
 
void printOut ()
 Printout. More...
 
void removeObject (void *ptr)
 Remove single object. More...
 

Protected Types

typedef void(* dtor_t) (void *)
 

Protected Attributes

dtor_t m_destructor
 Object destructor. More...
 
const std::type_info & m_type
 Object type. More...
 
std::set< void * > m_objects
 Set of objects. More...
 

Static Private Member Functions

static void __delete__ (void *p)
 

Detailed Description

template<class T>
class pool::DbObjectSet< T >

Description: Set to hold objects for memory tracing.

Author
M.Frank
Version
1.0

Definition at line 59 of file DbObjectSet.h.

Member Typedef Documentation

◆ dtor_t

typedef void(* pool::DbObjectSetBase::dtor_t) (void *)
protectedinherited

Definition at line 31 of file DbObjectSet.h.

Constructor & Destructor Documentation

◆ DbObjectSet() [1/2]

template<class T >
pool::DbObjectSet< T >::DbObjectSet
inline

Constructor.

Definition at line 82 of file DbObjectSet.h.

83  : DbObjectSetBase(__delete__, typeid(T)) { }

◆ DbObjectSet() [2/2]

template<class T >
pool::DbObjectSet< T >::DbObjectSet ( dtor_t  dt)
inline

Constructor with destroy function.

Constructor.

Definition at line 87 of file DbObjectSet.h.

88  : DbObjectSetBase(dt, typeid(T)) { }

◆ ~DbObjectSet()

template<class T >
pool::DbObjectSet< T >::~DbObjectSet
inlinevirtual

Standard destructor.

Definition at line 91 of file DbObjectSet.h.

91 { }

Member Function Documentation

◆ __delete__()

template<class T >
static void pool::DbObjectSet< T >::__delete__ ( void *  p)
inlinestaticprivate

Definition at line 61 of file DbObjectSet.h.

61  {
62  T* q=(T*)p;
63  if ( q ) delete q;
64  }

◆ add()

template<class T >
void pool::DbObjectSet< T >::add ( T *  pObj)
inline

Add object to set.

Definition at line 94 of file DbObjectSet.h.

94  {
95  m_objects.insert(pObj);
96  }

◆ printOut()

void pool::DbObjectSetBase::printOut ( )
inherited

Printout.

◆ remove()

template<class T >
void pool::DbObjectSet< T >::remove ( T *  pObj)
inline

Remove single object from set.

Definition at line 98 of file DbObjectSet.h.

98  {
99  removeObject(pObj);
100  }

◆ removeObject()

void pool::DbObjectSetBase::removeObject ( void *  ptr)
inherited

Remove single object.

Member Data Documentation

◆ m_destructor

dtor_t pool::DbObjectSetBase::m_destructor
protectedinherited

Object destructor.

Definition at line 34 of file DbObjectSet.h.

◆ m_objects

std::set<void*> pool::DbObjectSetBase::m_objects
protectedinherited

Set of objects.

Definition at line 38 of file DbObjectSet.h.

◆ m_type

const std::type_info& pool::DbObjectSetBase::m_type
protectedinherited

Object type.

Definition at line 36 of file DbObjectSet.h.


The documentation for this class was generated from the following file:
pool::DbObjectSetBase::removeObject
void removeObject(void *ptr)
Remove single object.
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
CaloNoise_fillDB.dt
dt
Definition: CaloNoise_fillDB.py:58
pool::DbObjectSetBase::DbObjectSetBase
DbObjectSetBase(dtor_t dtor, const std::type_info &type)
Constructor.
pool::DbObjectSet::__delete__
static void __delete__(void *p)
Definition: DbObjectSet.h:61
extractSporadic.q
list q
Definition: extractSporadic.py:98
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
pool::DbObjectSetBase::m_objects
std::set< void * > m_objects
Set of objects.
Definition: DbObjectSet.h:38