#include <ProxyDict.h>
Inheritance diagram for PSEvt::ProxyDict:
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 AliasMap * | aliasMap () const |
Return pointer to alias map. |
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.
Definition at line 58 of file ProxyDict.h.
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.
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.
[in] | key | Event key for the data object. |
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.
[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. |
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.
[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.
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.
[in] | key | Event key for the data object. |
Implements PSEvt::ProxyDictI.
Reimplemented in PSEvt::ProxyDictHist.
Definition at line 151 of file ProxyDict.cpp.
Referenced by PSEvt::ProxyDictHist::removeImpl().