LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Types | Private Attributes | List of all members
SIO::SIOHandlerMgr Class Reference

Holds instances of all types of SIOObjectHandlers. More...

#include <SIOHandlerMgr.h>

Public Member Functions

 SIOHandlerMgr ()
 
 ~SIOHandlerMgr ()=default
 
std::shared_ptr< SIOObjectHandlergetHandler (const std::string &type) const
 Returns the instance of the handler for the given type - null if it doesn't exist. More...
 
void registerHandler (const std::string &type, std::unique_ptr< SIOObjectHandler > handler)
 Registers an instance of a handler for the given type. More...
 

Private Types

typedef std::map< std::string,
std::shared_ptr
< SIOObjectHandler > > 
SIOHandlerMap
 

Private Attributes

SIOHandlerMap _map {}
 The handler map. More...
 

Detailed Description

Holds instances of all types of SIOObjectHandlers.

New types need to have their handler classes registered here.

Author
gaede
Version
Id:
SIOHandlerMgr.h,v 1.5 2005-04-15 08:37:42 gaede Exp

Definition at line 20 of file SIOHandlerMgr.h.

Member Typedef Documentation

Definition at line 21 of file SIOHandlerMgr.h.

Constructor & Destructor Documentation

SIO::SIOHandlerMgr::SIOHandlerMgr ( )

Definition at line 28 of file SIOHandlerMgr.cc.

References _map.

SIO::SIOHandlerMgr::~SIOHandlerMgr ( )
default

Member Function Documentation

std::shared_ptr< SIOObjectHandler > SIO::SIOHandlerMgr::getHandler ( const std::string type) const

Returns the instance of the handler for the given type - null if it doesn't exist.

Definition at line 57 of file SIOHandlerMgr.cc.

References _map, std::map< K, T >::end(), and std::map< K, T >::find().

Referenced by IOIMPL::LCEventLazyImpl::setupBlocks(), and SIO::SIOEventRecord::setupBlocks().

void SIO::SIOHandlerMgr::registerHandler ( const std::string type,
std::unique_ptr< SIOObjectHandler handler 
)

Registers an instance of a handler for the given type.

Fails if type name allready exists.

Definition at line 67 of file SIOHandlerMgr.cc.

References _map, std::map< K, T >::end(), and std::map< K, T >::find().

Member Data Documentation

SIOHandlerMap SIO::SIOHandlerMgr::_map {}
private

The handler map.

Definition at line 37 of file SIOHandlerMgr.h.

Referenced by getHandler(), registerHandler(), and SIOHandlerMgr().


The documentation for this class was generated from the following files: