#include <LHEProxy.h>
Public Types | |
typedef unsigned long | ProxyID |
Public Member Functions | |
void | clearEvent () |
void | clearRunInfo () |
const boost::shared_ptr < LHEEvent > & | getEvent () const |
ProxyID | getID () const |
const boost::shared_ptr < LHERunInfo > & | getRunInfo () const |
void | loadEvent (const boost::shared_ptr< LHEEvent > &event) |
void | loadRunInfo (const boost::shared_ptr< LHERunInfo > &runInfo) |
boost::shared_ptr< LHEEvent > | releaseEvent () |
boost::shared_ptr< LHERunInfo > | releaseRunInfo () |
~LHEProxy () | |
Static Public Member Functions | |
static boost::shared_ptr < LHEProxy > | create () |
static boost::shared_ptr < LHEProxy > | find (ProxyID id) |
Private Member Functions | |
LHEProxy (ProxyID id) | |
LHEProxy (const LHEProxy &orig) | |
LHEProxy & | operator= (const LHEProxy &orig) |
Private Attributes | |
boost::shared_ptr< LHEEvent > | event |
const ProxyID | id |
boost::shared_ptr< LHERunInfo > | runInfo |
Definition at line 12 of file LHEProxy.h.
typedef unsigned long lhef::LHEProxy::ProxyID |
Definition at line 14 of file LHEProxy.h.
LHEProxy::~LHEProxy | ( | ) |
Definition at line 32 of file LHEProxy.cc.
References getProxyMapInstance(), and mutex.
{ boost::mutex::scoped_lock scoped_lock(mutex); ProxyMap *map = getProxyMapInstance(); if (map) map->erase(id); }
LHEProxy::LHEProxy | ( | ProxyID | id | ) | [private] |
lhef::LHEProxy::LHEProxy | ( | const LHEProxy & | orig | ) | [private] |
void lhef::LHEProxy::clearEvent | ( | ) | [inline] |
Definition at line 37 of file LHEProxy.h.
{ event.reset(); }
void lhef::LHEProxy::clearRunInfo | ( | ) | [inline] |
boost::shared_ptr< LHEProxy > LHEProxy::create | ( | void | ) | [static] |
Definition at line 41 of file LHEProxy.cc.
References getProxyMapInstance(), LHEProxy(), mutex, and tests::test_CacheProxy::proxy.
{ static LHEProxy::ProxyID nextProxyID = 0; boost::mutex::scoped_lock scoped_lock(mutex); boost::shared_ptr<LHEProxy> proxy(new LHEProxy(++nextProxyID)); ProxyMap *map = getProxyMapInstance(); if (map) map->insert(ProxyMap::value_type(proxy->getID(), proxy)); return proxy; }
Definition at line 56 of file LHEProxy.cc.
References getProxyMapInstance(), mutex, and pos.
{ boost::mutex::scoped_lock scoped_lock(mutex); ProxyMap *map = getProxyMapInstance(); if (!map) return boost::shared_ptr<LHEProxy>(); ProxyMap::const_iterator pos = map->find(id); if (pos == map->end()) return boost::shared_ptr<LHEProxy>(); return boost::shared_ptr<LHEProxy>(pos->second); }
const boost::shared_ptr<LHEEvent>& lhef::LHEProxy::getEvent | ( | ) | const [inline] |
ProxyID lhef::LHEProxy::getID | ( | ) | const [inline] |
const boost::shared_ptr<LHERunInfo>& lhef::LHEProxy::getRunInfo | ( | ) | const [inline] |
void lhef::LHEProxy::loadEvent | ( | const boost::shared_ptr< LHEEvent > & | event | ) | [inline] |
void lhef::LHEProxy::loadRunInfo | ( | const boost::shared_ptr< LHERunInfo > & | runInfo | ) | [inline] |
boost::shared_ptr<LHEEvent> lhef::LHEProxy::releaseEvent | ( | ) | [inline] |
Definition at line 29 of file LHEProxy.h.
References event, and query::result.
boost::shared_ptr<LHERunInfo> lhef::LHEProxy::releaseRunInfo | ( | ) | [inline] |
Definition at line 23 of file LHEProxy.h.
References query::result, and runInfo.
boost::shared_ptr<LHEEvent> lhef::LHEProxy::event [private] |
Definition at line 59 of file LHEProxy.h.
Referenced by getEvent(), loadEvent(), and releaseEvent().
const ProxyID lhef::LHEProxy::id [private] |
Definition at line 56 of file LHEProxy.h.
Referenced by getID().
boost::shared_ptr<LHERunInfo> lhef::LHEProxy::runInfo [private] |
Definition at line 58 of file LHEProxy.h.
Referenced by clearRunInfo(), getRunInfo(), loadRunInfo(), and releaseRunInfo().