ATLAS Offline Software
Loading...
Searching...
No Matches
TPCnvElt.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-2019 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id$
14
15
16#ifndef ATHENAPOOLCNVSVC_TPCNVELT_H
17#define ATHENAPOOLCNVSVC_TPCNVELT_H
18
19
22#include <typeinfo>
23#include <memory>
24
25class MsgStream;
26
27
31template <class TRANS> class T_TPCnvNull
32{
33};
34
35
36namespace AthenaPoolCnvSvc {
37
38
45Guid guidFromTypeinfo (const std::type_info& ti);
46
47
60template <class CNV, class TPCNV>
62{
63public:
65 typedef typename TPCNV::Trans_t Trans_t;
66 typedef typename TPCNV::Pers_t Pers_t;
67
68
73
74
86 std::unique_ptr<Trans_t>
87 createTransient (CNV& parent, const Token* token, const std::string& key, MsgStream& msg);
88
89
102 bool persToTrans (CNV& parent, Trans_t* trans, const Token* token, const std::string& key, MsgStream& msg);
103
104
105private:
108
110 TPCNV m_cnv;
111};
112
113
118template <class CNV, class TRANS>
119class TPCnvElt<CNV, T_TPCnvNull<TRANS> >
120{
121public:
123 typedef TRANS Trans_t;
124 typedef TRANS Pers_t;
125
126
131
132
144 std::unique_ptr<Trans_t>
145 createTransient (CNV& parent, const Token* token, const std::string& key, MsgStream& msg);
146
147
160 bool persToTrans (CNV& parent, Trans_t* trans, const Token* token, const std::string& key, MsgStream& msg);
161
162
163private:
166};
167
168
169} // namespace AthenaPoolCnvSvc
170
171
173
174
175#endif // not ATHENAPOOLCNVSVC_TPCNVELT_H
Helpers for calling TP converters.
This file contains the class definition for the Token class (migrated from POOL).
bool persToTrans(CNV &parent, Trans_t *trans, const Token *token, const std::string &key, MsgStream &msg)
Read the persistent object and convert it to transient.
TRANS Trans_t
Make available the persistent and transient types.
Definition TPCnvElt.h:123
Guid m_guid
GUID for the persistent class we read.
Definition TPCnvElt.h:165
std::unique_ptr< Trans_t > createTransient(CNV &parent, const Token *token, const std::string &key, MsgStream &msg)
Read the persistent object and convert it to transient.
Guid m_guid
GUID for the persistent class we read.
Definition TPCnvElt.h:107
TPCNV m_cnv
The underlying TP converter.
Definition TPCnvElt.h:110
std::unique_ptr< Trans_t > createTransient(CNV &parent, const Token *token, const std::string &key, MsgStream &msg)
Read the persistent object and convert it to transient.
TPCNV::Trans_t Trans_t
Make available the persistent and transient types.
Definition TPCnvElt.h:65
bool persToTrans(CNV &parent, Trans_t *trans, const Token *token, const std::string &key, MsgStream &msg)
Read the persistent object and convert it to transient.
This class provides a encapsulation of a GUID/UUID/CLSID/IID data structure (128 bit number).
Definition Guid.h:25
Placeholder for the case where no conversion is to be done.
Definition TPCnvElt.h:32
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:21
Guid guidFromTypeinfo(const std::type_info &ti)
Given a type_info, get the corresponding pool guid.
Definition TPCnvElt.cxx:30
MsgStream & msg
Definition testRead.cxx:32