ATLAS Offline Software
Loading...
Searching...
No Matches
SingleAssociationTool.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3/*
4 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id$
14
15
16#ifndef D3PDMAKERUTILS_SINGLEASSOCIATIONTOOL_H
17#define D3PDMAKERUTILS_SINGLEASSOCIATIONTOOL_H
18
19
22
23
24
25namespace D3PD {
26
27
33template <typename TO_T>
36{
37public:
44 SingleAssociationToolTo (const std::string& type,
45 const std::string& name,
46 const IInterface* parent);
47
48
52 virtual const std::type_info& typeinfo() const;
53
54
64 virtual void releaseObject (const typename SelectType<TO_T, 0>::type* p);
65
66
76 virtual void releaseObjectUntyped (const void* p);
77};
78
79
80//=========================================================================
81
82
130template <typename FROM_T, typename TO_T = FROM_T>
132 : public SingleAssociationToolTo<TO_T>
133{
134public:
141 SingleAssociationTool (const std::string& type,
142 const std::string& name,
143 const IInterface* parent);
144
145
153 virtual const void* getUntyped (const void* p);
154
155
159 virtual const std::type_info& fromTypeinfo() const;
160
161
168 virtual const TO_T* get (const FROM_T& p) = 0;
169};
170
171
172} // namespace D3PD
173
174
177
178
179#endif // not D3PDMAKERUTILS_SINGLEASSOCIATIONTOOL_H
A simple tuple of multiple types.
Non-template parts of SingleAssociationTool.
A specialization of SingleAssociationTool that can accept one of several types.
SingleAssociationToolImpl(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
virtual void releaseObject(const typename SelectType< TO_T, 0 >::type *p)
Release an object retrieved from the association.
virtual void releaseObjectUntyped(const void *p)
Release an object retrieved from the association.
SingleAssociationToolTo(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
virtual const std::type_info & typeinfo() const
Return the type of object retrieved by this tool.
virtual const TO_T * get(const FROM_T &p)=0
Return the target object.
virtual const void * getUntyped(const void *p)
Return the target object.
virtual const std::type_info & fromTypeinfo() const
Return the std::type_info for the source of the association.
SingleAssociationTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard Gaudi tool constructor.
Block filler tool for noisy FEB information.