5#ifndef TOPLEVELTPCONVERTER_H
6#define TOPLEVELTPCONVERTER_H
31template<
class MAIN_CNV,
class TL_PERS >
37 typedef typename MAIN_CNV::Trans_t
TRANS;
130 const std::string& key,
151 template<
typename STORAGE >
186 MsgStream& log)
override
195 MsgStream& log)
override
This file contains template definitions for Transient/Persistent converters.
Base class template for Top-Level TP converters, specialized with persistent type.
Define macros for attributes used to control the static checker.
#define ATLAS_THREAD_SAFE
virtual void clearTLPersObject() override
Discard the persistent object.
virtual void deleteTLPersObject() override
Delete the persistent object owned by the converter.
virtual void createTLPersObject() override
Create persistent object - the converter keeps it.
virtual void setTLPersObject(void *persObj) override
Take ownership of the persistent object.
TL_PERS * getTLPersObject()
virtual void addTPConverter(ITPConverter *cnv)
Add a TP converter to this top level converter.
TRANS * createTransient(MsgStream &log)
Create transient representation of the persistent object known to this converter.
virtual TRANS * createTransient(const TL_PERS *persObj, MsgStream &log)
Create transient representation of persObj.
virtual const std::type_info & persistentTInfo() const override
return C++ type id of the persistent class this converter is for
TRANS * createTransientWithKey(const std::string &key, MsgStream &log)
Create transient representation of the persistent object known to this converter.
virtual void persToTrans(const PERS *pers, TRANS *trans, MsgStream &msg)
virtual const std::type_info & transientTInfo() const override
return C++ type id of the transient class this converter is for
SegmentCollectionCnv_p1 m_mainConverter
virtual TL_PERS * createPersistent(const TRANS *transObj, MsgStream &log)
Create persistent representation of transObj.
TopLevelTPConverter()
Constructor.
virtual void persToTransWithKeyUntyped(const void *pers, void *trans, const std::string &, MsgStream &log) override
Convert persistent object representation to transient.
virtual void transToPers(const TRANS *trans, PERS *pers, MsgStream &msg)
void setMainCnvPStorage(STORAGE *storage)
Set the persistent storage space for the main TP converter.
virtual void transToPersUntyped(const void *trans, void *pers, MsgStream &log) override
Convert transient object representation to persistent.
virtual void persToTransUntyped(const void *pers, void *trans, MsgStream &log) override
Convert persistent object representation to transient.
void addMainTPConverter()
Add the main TP converter to the internal list - should be called from user-defined constructor.
virtual void transToPersWithKeyUntyped(const void *trans, void *pers, const std::string &, MsgStream &log) override
Convert transient object representation to persistent.
virtual unsigned short getConverterID() override
Returns this converter's ID.
virtual TL_PERS * createPersistentWithKey(const TRANS *transObj, const std::string &key, MsgStream &log)
Create persistent representation of transObj.
virtual void setPStorage(TL_PERS *persObj) override=0
A stub for a method that should be provided by the converter creator.