Beispiel #1
0
 /// @brief Given an endpoint, retrieve the associated client.  Return
 ///        an empty shared pointer if one is not found.
 mapped_type get(key_type key) const
 {
     auto result = clients_.find(key);
     return clients_.end() != result
       ? result->second
       : mapped_type();
 }
 // Add a new operation to the queue. Returns true if this is the only
 // operation for the given descriptor, in which case the reactor's event
 // demultiplexing function call may need to be interrupted and restarted.
 bool enqueue_operation(Descriptor descriptor, reactor_op* op)
 {
   std::pair<iterator, bool> entry =
     operations_.insert(value_type(descriptor, mapped_type()));
   entry.first->second.push(op);
   return entry.second;
 }
Beispiel #3
0
void
address_set_type::
track(const void *ptr, const char *file, int line)
{
  m_mutex.lock();
  insert(value_type(ptr, mapped_type(file, line)));
  m_mutex.unlock();
}
Beispiel #4
0
CIntervalTree::iterator
CIntervalTree::IntervalsOverlapping(const interval_type& interval)
{
    coordinate_type x = interval.GetFrom();
    coordinate_type y = interval.GetTo();

    iterator it(x, TTraits::GetMaxCoordinate(), 0, &m_Root);

    TTreeMapI iter =
        m_ByX.lower_bound(TTreeMapValue(x + 1, 0, mapped_type()));
    if ( iter != m_ByX.end() && iter->GetKey() <= y ) {
        it.m_SearchLimit = y;
        it.m_CurrentMapValue = &TTreeMap::get(iter);
    }
    else {
        it.NextLevel();
    }
    return it;
}
Beispiel #5
0
	  static std::string
	  desc()
	  { return desc(mapped_type()); }
Beispiel #6
0
	  static std::string
	  name()
	  { return name(mapped_type()); }
 node(key_type const& key, attribute* attr)
     : m_Value(key, mapped_type()), m_pAttribute(attr)
 {
 }
Beispiel #8
0
 SNode(const key_type& key)
     : value_type(key, mapped_type())
     {
     }
Beispiel #9
0
 iterator find(const key_type& k) {
   return set.find(std::make_pair(k, mapped_type()));
 }
Beispiel #10
0
 size_type erase(const key_type& k) {
   set.erase(std::make_pair(k, mapped_type()));
 }