BOSS
7.0.6
BESIII Offline Software System
Loading...
Searching...
No Matches
MakerTrait.h
Go to the documentation of this file.
1
#ifndef DCHAIN_MAKERTRAIT_H
2
#define DCHAIN_MAKERTRAIT_H
3
// -*- C++ -*-
4
//
5
// Package: <DChain>
6
// Module: MakerTrait
7
//
8
/**\class MakerTrait MakerTrait.h DChain/MakerTrait.h
9
10
Description: <one line class summary>
11
12
Usage:
13
<usage>
14
15
*/
16
//
17
// Author: Chris D Jones
18
// Created: Thu Jan 5 15:37:46 EST 2006
19
// $Id: MakerTrait.h,v 1.1.1.1 2009/03/03 06:06:56 maqm Exp $
20
//
21
// Revision history
22
//
23
// $Log: MakerTrait.h,v $
24
// Revision 1.1.1.1 2009/03/03 06:06:56 maqm
25
// first import of DecayChain
26
//
27
// Revision 1.1 2006/01/11 20:28:09 cdj
28
// massive class renaming, addition of [] for selection and unit tests
29
//
30
31
// system include files
32
33
// user include files
34
35
// forward declarations
36
namespace
dchain
{
37
template
<
class
T>
38
struct
NewMaker
{
39
40
typedef
ReferenceHolderBase<T*, T&>
result_type
;
41
42
template
<
class
U>
43
result_type
operator()
(
const
U& iU)
const
{
44
return
result_type
(
new
T(iU));
45
}
46
};
47
48
template
<
class
T>
49
struct
MakerTrait
{
50
typedef
NewMaker<T>
maker_type
;
51
};
52
53
template
<
class
T>
54
struct
ResultTypeTrait
{
55
typedef
typename
T::result_type
type
;
56
};
57
58
template
<
class
TReturn,
class
TArg>
59
struct
ResultTypeTrait
< TReturn (*)(
const
TArg&)> {
60
typedef
TReturn
type
;
61
};
62
63
}
64
// inline function definitions
65
66
67
#endif
/* DCHAIN_MAKERTRAIT_H */
dchain::ReferenceHolderBase
Definition:
ReferenceHolderBase.h:41
dchain
Definition:
children.h:16
dchain::MakerTrait
Definition:
MakerTrait.h:49
dchain::MakerTrait::maker_type
NewMaker< T > maker_type
Definition:
MakerTrait.h:50
dchain::NewMaker
Definition:
MakerTrait.h:38
dchain::NewMaker::operator()
result_type operator()(const U &iU) const
Definition:
MakerTrait.h:43
dchain::NewMaker::result_type
ReferenceHolderBase< T *, T & > result_type
Definition:
MakerTrait.h:40
dchain::ResultTypeTrait< TReturn(*)(const TArg &)>::type
TReturn type
Definition:
MakerTrait.h:60
dchain::ResultTypeTrait
Definition:
MakerTrait.h:54
dchain::ResultTypeTrait::type
T::result_type type
Definition:
MakerTrait.h:55
source
Event
DecayChain
DecayChain-00-00-03-slc6tag
DecayChain
Element
MakerTrait.h
Generated by
1.9.6