ATLAS Offline Software
Loading...
Searching...
No Matches
DataBucketBase.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ATHENAKERNEL_DATABUCKETBASE_H
6#define ATHENAKERNEL_DATABUCKETBASE_H
7
14
15
16#include "GaudiKernel/DataObject.h"
17#include <typeinfo>
18
19namespace SG {
21}
22
23class DataBucketBase : public DataObject
24{
25
26 public:
27
29 virtual ~DataBucketBase() { };
30 virtual void* object() = 0;
31
35 virtual const std::type_info& tinfo() const = 0;
36
45 template <class T> T* cast (SG::IRegisterTransient* irt = 0,
46 bool isConst = true);
47
56 virtual void* cast (CLID clid,
58 bool isConst = true) = 0;
59
68 virtual void* cast (const std::type_info& tinfo,
70 bool isConst = true) = 0;
71
84 virtual void* cast (CLID clid,
85 const std::type_info& tinfo,
87 bool isConst = true);
88
93 virtual void relinquish() = 0;
94
98 virtual void lock() = 0;
99};
100
101
103
104
105#endif
106
uint32_t CLID
The Class ID type.
virtual void lock()=0
If the held object derives from ILockable, call lock() on it.
virtual void * cast(CLID clid, SG::IRegisterTransient *irt=0, bool isConst=true)=0
Return the contents of the DataBucket, converted to type given by clid.
virtual void * object()=0
virtual void relinquish()=0
Give up ownership of the DataBucket contents.
virtual const std::type_info & tinfo() const =0
Return the type_info for the stored object.
virtual ~DataBucketBase()
virtual void * cast(CLID clid, const std::type_info &tinfo, SG::IRegisterTransient *irt=0, bool isConst=true)
Return the contents of the DataBucket, converted to type given by clid.
T * cast(SG::IRegisterTransient *irt=0, bool isConst=true)
Return the contents of the DataBucket, converted to type T.
virtual void * cast(const std::type_info &tinfo, SG::IRegisterTransient *irt=0, bool isConst=true)=0
Return the contents of the DataBucket, converted to type given by std::type_info.
Interface for registering a transient object in t2p map.
Forward declaration.