BOSS 6.6.4.p01
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
36namespace dchain {
37 template<class T>
38 struct NewMaker {
39
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 {
51 };
52
53 template<class T>
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 */
NewMaker< T > maker_type
Definition: MakerTrait.h:50
result_type operator()(const U &iU) const
Definition: MakerTrait.h:43
ReferenceHolderBase< T *, T & > result_type
Definition: MakerTrait.h:40
T::result_type type
Definition: MakerTrait.h:55