6 using namespace ThePEG;
10 typedef std::map<ProxyBase::ProxyID, std::weak_ptr<ProxyBase> >
ProxyMap;
13 static struct Sentinel {
23 return sentinel.instance;
29 std::scoped_lock scoped_lock(
mutex);
39 std::scoped_lock scoped_lock(
mutex);
41 std::shared_ptr<ProxyBase>
proxy(ctor(++nextProxyID));
51 std::scoped_lock scoped_lock(
mutex);
55 return std::shared_ptr<ProxyBase>();
57 ProxyMap::const_iterator pos = map->find(
id);
58 if (pos == map->end())
59 return std::shared_ptr<ProxyBase>();
61 return std::shared_ptr<ProxyBase>(pos->second);
static PFTauRenderPlugin instance
std::map< ProxyBase::ProxyID, std::weak_ptr< ProxyBase > > ProxyMap
static ProxyMap * getProxyMapInstance()
Container::value_type value_type
ProxyBase(const ProxyBase &orig)=delete
static std::shared_ptr< ProxyBase > find(ProxyID id)
static std::shared_ptr< ProxyBase > create(ctor_t ctor)