00001
00002
00003
00012 #ifndef ATHCONTAINERS_TOOLS_DVLDATABUCKET_H
00013 #define ATHCONTAINERS_TOOLS_DVLDATABUCKET_H
00014
00015 #include "SGTools/DataBucket.h"
00016 #include "AthContainers/tools/DVLInfo.h"
00017 #include <memory>
00018
00019
00020 namespace SG {
00021
00022
00038 template <class T>
00039 class DVLDataBucket
00040 : public SG::DataBucket<T>
00041 {
00042 public:
00046 DVLDataBucket() {}
00047
00048
00053 DVLDataBucket (T* data);
00054
00055
00056 #if __cplusplus > 201100
00057
00061 DVLDataBucket(std::unique_ptr<T> data);
00062 #endif
00063
00064
00069 DVLDataBucket (const DVLDataBucket& other);
00070
00071
00075 ~DVLDataBucket();
00076
00077
00086 virtual void* cast (CLID clid, IRegisterTransient* irt = 0,
00087 bool isConst = true) const;
00088
00089
00098 virtual void* cast (const std::type_info& tinfo,
00099 IRegisterTransient* irt = 0,
00100 bool isConst = true) const;
00101
00102
00107 virtual DVLDataBucket* clone() const;
00108
00109
00110 private:
00111 typedef std::pair<DataModel_detail::DVLInfoBase*, void*> ent_t;
00112 typedef std::vector<ent_t> vec_t;
00113 mutable vec_t m_copies;
00114
00115
00116 DVLDataBucket& operator= (const DVLDataBucket&);
00117 };
00118
00119
00120 }
00121
00122
00123 #include "AthContainers/tools/DVLDataBucket.icc"
00124
00125
00126 #endif // not ATHCONTAINERS_TOOLS_DVLDATABUCKET_H