|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #ifndef ATHENAPOOLCNVSVC_ITPConverter_H
8 #define ATHENAPOOLCNVSVC_ITPConverter_H 1
85 MsgStream&
log )
const;
98 MsgStream&
log )
const;
111 template<
class CONVERTER_BASE>
114 typedef std::map<const std::type_index, CONVERTER_BASE*>
TId_Map_t;
130 const std::type_info &objTypeInfo);
146 template<
class CONVERTER_BASE>
152 typename TId_Map_t::const_iterator iter = m_cnvRegistry.find( std::type_index(objTypeInfo) );
153 return (iter == m_cnvRegistry.end())?
158 template<
class CONVERTER_BASE>
164 m_cnvRegistry[std::type_index(objTypeInfo)] = converter;
JetConstituentVector::iterator iterator
CONVERTER_BASE * findConverter(const std::type_info &objTypeInfo) const
Find converter for a given C++ type info.
virtual const TPObjRef::typeID_t & typeID() const =0
Return TP typeID for persistent objects produced by this converter.
virtual const std::type_info & transBaseTInfo() const =0
return C++ type id of the common base transient type for all converters for a group of polymorphic ty...
virtual void setRuntimeTopConverter(TopLevelTPCnvBase *topConverter)=0
Set runtime top-level converter - usually it is the owning TL converter, but in case of extended obje...
virtual void reservePStorage(size_t size)=0
Reserve 'size' elements for persistent storage.
std::map< const std::type_index, CONVERTER_BASE * > TId_Map_t
virtual ~ITPConverter()=default
virtual const TopLevelTPCnvBase * topConverter() const
TId_Map_t m_cnvRegistry
map of the converters, indexed by type_index
Base class for top-level TP converters.
TId_Map_t::iterator iterator
virtual void converterNotFound(const std::type_info &converterType, ITPConverter *c, const std::string &typeName, MsgStream &log) const
method called when the right TP converter was not found during writing
void addConverter(CONVERTER_BASE *converter, const std::type_info &objTypeInfo)
Add a new converter to the map.
virtual TopLevelTPCnvBase * topConverter()
return the top-level converter for this elemental TP converter
virtual void setTopConverter(TopLevelTPCnvBase *topConverter, const TPObjRef::typeID_t &TPtypeID)=0
Set which top-level converter owns this elemental converter, and what TPtypeID was assigned to the pe...
class TPConverterTypeMap Converter registry template: a map from type_info to the appropriate convert...