コード例 #1
0
ファイル: main.cpp プロジェクト: CCJY/coliru
 /// @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;
 }
コード例 #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();
}
コード例 #4
0
ファイル: itree.cpp プロジェクト: svn2github/ncbi_tk
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;
}
コード例 #5
0
ファイル: string_form.hpp プロジェクト: 5432935/crossbridge
	  static std::string
	  desc()
	  { return desc(mapped_type()); }
コード例 #6
0
ファイル: string_form.hpp プロジェクト: 5432935/crossbridge
	  static std::string
	  name()
	  { return name(mapped_type()); }
コード例 #7
0
 node(key_type const& key, attribute* attr)
     : m_Value(key, mapped_type()), m_pAttribute(attr)
 {
 }
コード例 #8
0
ファイル: limited_size_map.hpp プロジェクト: swuecho/igblast
 SNode(const key_type& key)
     : value_type(key, mapped_type())
     {
     }
コード例 #9
0
ファイル: pmap.hpp プロジェクト: deepsea-inria/pctl
 iterator find(const key_type& k) {
   return set.find(std::make_pair(k, mapped_type()));
 }
コード例 #10
0
ファイル: pmap.hpp プロジェクト: deepsea-inria/pctl
 size_type erase(const key_type& k) {
   set.erase(std::make_pair(k, mapped_type()));
 }