PSEvt::ProxyDict Class Reference
[PSEvt package]

Implementation of the proxy dictionary interface. More...

#include <ProxyDict.h>

Inheritance diagram for PSEvt::ProxyDict:

PSEvt::ProxyDictI PSEvt::ProxyDictHist List of all members.

Public Member Functions

 ProxyDict (const boost::shared_ptr< AliasMap > &amap)
virtual ~ProxyDict ()

Protected Member Functions

virtual void putImpl (const boost::shared_ptr< ProxyI > &proxy, const EventKey &key)
 Add one more proxy object to the dictionary.
virtual boost::shared_ptr<
void > 
getImpl (const std::type_info *typeinfo, const Source &source, const std::string &key, Pds::Src *foundSrc)
 Get an object from event.
virtual bool existsImpl (const EventKey &key)
 Check if proxy of given type exists in the event.
virtual bool removeImpl (const EventKey &key)
 Remove object of given type from the event.
virtual void keysImpl (std::list< EventKey > &keys, const Source &source) const
 Get the list of event keys defined in event.
virtual const AliasMapaliasMap () const
 Return pointer to alias map.

Detailed Description

Implementation of the proxy dictionary interface.

This implementation is based on std::map which matches event keys (EventKey class) with the corresponding proxy object.

This software was developed for the LCLS project. If you use all or part of it, please give an appropriate acknowledgment.

Version:
$Id: ProxyDict.h 7525 2014-01-13 19:52:29Z salnikov@SLAC.STANFORD.EDU $
Author:
Andrei Salnikov

Definition at line 58 of file ProxyDict.h.


Constructor & Destructor Documentation

PSEvt::ProxyDict::ProxyDict ( const boost::shared_ptr< AliasMap > &  amap  ) 

Definition at line 40 of file ProxyDict.cpp.

PSEvt::ProxyDict::~ProxyDict (  )  [virtual]

Definition at line 49 of file ProxyDict.cpp.


Member Function Documentation

virtual const AliasMap* PSEvt::ProxyDict::aliasMap (  )  const [inline, protected, virtual]

Return pointer to alias map.

Can return 0 pointer if alias map is not present.

Reimplemented from PSEvt::ProxyDictI.

Definition at line 121 of file ProxyDict.h.

bool PSEvt::ProxyDict::existsImpl ( const EventKey key  )  [protected, virtual]

Check if proxy of given type exists in the event.

Parameters:
[in] key Event key for the data object.
Returns:
true if proxy exists

Implements PSEvt::ProxyDictI.

Definition at line 145 of file ProxyDict.cpp.

boost::shared_ptr< void > PSEvt::ProxyDict::getImpl ( const std::type_info *  typeinfo,
const Source source,
const std::string &  key,
Pds::Src *  foundSrc 
) [protected, virtual]

Get an object from event.

Parameters:
[in] typeinfo Dynamic type info object
[in] source Source detector address.
[in] key Optional key to distinguish different objects of the same type.
[out] foundSrc If pointer is non-zero then pointed object will be assigned with the exact source address of the returned object.
Returns:
Shared pointer of void type.

Implements PSEvt::ProxyDictI.

Definition at line 87 of file ProxyDict.cpp.

References PSEvt::EventKey::anySource(), PSEvt::Source::SrcMatch::isExact(), PSEvt::Source::SrcMatch::match(), PSEvt::Source::SrcMatch::src(), and PSEvt::Source::srcMatch().

void PSEvt::ProxyDict::keysImpl ( std::list< EventKey > &  keys,
const Source source 
) const [protected, virtual]

Get the list of event keys defined in event.

Parameters:
[in] source matching source address
[out] keys list of the EventKey objects

Implements PSEvt::ProxyDictI.

Definition at line 157 of file ProxyDict.cpp.

References PSEvt::Source::SrcMatch::match(), and PSEvt::Source::srcMatch().

void PSEvt::ProxyDict::putImpl ( const boost::shared_ptr< ProxyI > &  proxy,
const EventKey key 
) [protected, virtual]

Add one more proxy object to the dictionary.

Parameters:
[in] proxy Proxy object for type T.
[in] key Event key for the data object.

Implements PSEvt::ProxyDictI.

Reimplemented in PSEvt::ProxyDictHist.

Definition at line 55 of file ProxyDict.cpp.

References PSEvt::EventKey::alias(), PSEvt::EventKey::key(), PSEvt::EventKey::src(), and PSEvt::EventKey::typeinfo().

Referenced by PSEvt::ProxyDictHist::putImpl().

bool PSEvt::ProxyDict::removeImpl ( const EventKey key  )  [protected, virtual]

Remove object of given type from the event.

Parameters:
[in] key Event key for the data object.
Returns:
false if object did not exist before this call

Implements PSEvt::ProxyDictI.

Reimplemented in PSEvt::ProxyDictHist.

Definition at line 151 of file ProxyDict.cpp.

Referenced by PSEvt::ProxyDictHist::removeImpl().


The documentation for this class was generated from the following files:
Generated on 19 Dec 2016 for PSANAclasses by  doxygen 1.4.7