BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/DecayChain/include/DecayChain/Element/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> struct NewMaker {
38
40
41 template <class U> result_type operator()( const U& iU ) const {
42 return result_type( new T( iU ) );
43 }
44 };
45
46 template <class T> struct MakerTrait {
48 };
49
50 template <class T> struct ResultTypeTrait {
51 typedef typename T::result_type type;
52 };
53
54 template <class TReturn, class TArg> struct ResultTypeTrait<TReturn ( * )( const TArg& )> {
55 typedef TReturn type;
56 };
57
58} // namespace dchain
59// inline function definitions
60
61#endif /* DCHAIN_MAKERTRAIT_H */