BOSS
7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
MutableReferenceHolder.h
Go to the documentation of this file.
1
#ifndef DCHAIN_MUTABLEREFERENCEHOLDER_H
2
#define DCHAIN_MUTABLEREFERENCEHOLDER_H
3
// -*- C++ -*-
4
//
5
// Package: DChain
6
// Module: MutableReferenceHolder
7
//
8
// Description: Smart pointer for classes that inherit from ReferenceCount and who can be modified
9
//
10
// Usage:
11
// This class wraps a pointer to a class inheriting from ReferenceCount
12
// and deals with proper handling of the reference counting used to
13
// manage the objects lifetime
14
//
15
// MutableReferenceHolder<Foo> pFoo = new Foo;
16
// pFoo->bar();
17
// takeReferenceToFoo( *pFoo);
18
// takePointerToFoo( pFoo.pointer() );
19
//
20
// Author: Chris Jones
21
// Created: Wed May 14 08:01:51 EDT 2003
22
// $Id: MutableReferenceHolder.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
23
//
24
// Revision history
25
//
26
// $Log: MutableReferenceHolder.h,v $
27
// Revision 1.1.1.1 2009/03/03 06:06:56 maqm
28
// first import of DecayChain
29
//
30
// Revision 1.1 2006/01/11 20:28:09 cdj
31
// massive class renaming, addition of [] for selection and unit tests
32
//
33
// Revision 1.1 2003/05/15 19:56:01 cdj
34
// revamped memory handling so always use a ReferenceHolder to deal with the reference counting
35
//
36
//
37
38
// system include files
39
40
// user include files
41
#include "
DecayChain/Element/ReferenceHolderBase.h
"
42
43
// forward declarations
44
namespace
dchain
{
45
template
<
class
T>
46
class
MutableReferenceHolder
:
public
ReferenceHolderBase
<T*, T&>
47
{
48
public
:
49
// Constructors and destructor
50
MutableReferenceHolder
() {}
51
MutableReferenceHolder
(T* iRef) :
ReferenceHolderBase
<T*, T&>(iRef) {}
52
53
};
54
}
55
#endif
// DCHAIN_MUTABLEREFERENCEHOLDER_H
ReferenceHolderBase.h
dchain::MutableReferenceHolder
Definition:
MutableReferenceHolder.h:47
dchain::MutableReferenceHolder::MutableReferenceHolder
MutableReferenceHolder(T *iRef)
Definition:
MutableReferenceHolder.h:51
dchain::MutableReferenceHolder::MutableReferenceHolder
MutableReferenceHolder()
Definition:
MutableReferenceHolder.h:50
dchain::ReferenceHolderBase
Definition:
ReferenceHolderBase.h:41
dchain
Definition:
children.h:16
source
Event
DecayChain
DecayChain-00-00-03-slc6tag
DecayChain
Element
MutableReferenceHolder.h
Generated by
1.9.6