3 #include <boost/thread.hpp>
4 #include <boost/shared_ptr.hpp>
5 #include <boost/weak_ptr.hpp>
13 typedef std::map< LHEProxy::ProxyID, boost::weak_ptr<LHEProxy> >
ProxyMap;
17 static struct Sentinel {
24 return sentinel.instance;
34 boost::mutex::scoped_lock scoped_lock(
mutex);
45 boost::mutex::scoped_lock scoped_lock(
mutex);
47 boost::shared_ptr<LHEProxy> proxy(
new LHEProxy(++nextProxyID));
58 boost::mutex::scoped_lock scoped_lock(
mutex);
62 return boost::shared_ptr<LHEProxy>();
64 ProxyMap::const_iterator
pos = map->find(
id);
65 if (pos == map->end())
66 return boost::shared_ptr<LHEProxy>();
68 return boost::shared_ptr<LHEProxy>(pos->second);
static boost::mutex mutex
static PFTauRenderPlugin instance
Container::value_type value_type
static ProxyMap * getProxyMapInstance()
std::map< LHEProxy::ProxyID, boost::weak_ptr< LHEProxy > > ProxyMap
static boost::shared_ptr< LHEProxy > find(ProxyID id)
static boost::shared_ptr< LHEProxy > create()