コード例 #1
0
ファイル: IntrHashSet.hpp プロジェクト: QC-git/MyLab
  ConstIterator Find(const T2& value)const
  {
	  uint32_t hashCode=value.getHashCode();
	  uint32_t hidx = hashCode%hashSize;

	  Node*const* nodePtr=&hash[hidx];
	  if(!*nodePtr)
		  return ConstIterator(0);

	  if(value.IsSameState(*((*nodePtr)->m_UserState)))
	  {
		  return ConstIterator(this,hidx,*nodePtr,nodePtr);
	  }
	  Node*const* parentPtr=nodePtr;
	  Node* node=(Node*)(*nodePtr)->ihsNextNode;
	  while(node)
	  {
		  if(value.IsSameState(*(node->m_UserState)))
		  {
			  return ConstIterator(this,hidx,node,parentPtr);
		  }
		  parentPtr=nodePtr;
		  nodePtr=(Node**)&node->ihsNextNode;
		  node=(Node*)node->ihsNextNode;
	  }
	  return ConstIterator(0);
  }
コード例 #2
0
ファイル: StaticList.hpp プロジェクト: novalabs/core-mw
 const ConstIterator
 begin() const
 {
     return ConstIterator(
         reinterpret_cast<const ConstLink*>(get_head_unsafe())
     );
 }
コード例 #3
0
ファイル: map.hpp プロジェクト: Nikhil14/Map
typename Map<T,H>::ConstIterator Map<T,H>::find(const_Key& other) const
{
    Node *n  = this->root;
    while(n!=nullptr)
    {
        if(n->pair_obj->first > other)
        {
            n = n->left;
        }
        else if(n->pair_obj->first < other)
        {
            n = n->right;
        }
        else if(n->pair_obj->first == other)
        {
            return (ConstIterator(n));
        }
    } 
    return ConstIterator(this->tail);
}
コード例 #4
0
ファイル: collection.cpp プロジェクト: wgsyd/wgtf
Collection::ConstIterator Collection::find(const Variant& key) const
{
	if (impl_)
	{
		return impl_->get(key, CollectionImplBase::GET_EXISTING).first;
	}
	else
	{
		return ConstIterator();
	}
}
コード例 #5
0
ファイル: map.hpp プロジェクト: Nikhil14/Map
typename Map<T,H>::const_Value& Map<T,H>::at(const_Key& other) const
{
    //std::cout<<"Constant At\n";
    ConstIterator i = find(other);
    if( i == ConstIterator(this->tail))
    {   
        //std::cout<<"OUT of Range"<<'\n';
        throw std::out_of_range("Value Not Present\n");
    }
    else
    {
        return (i.iter_node->pair_obj->second);
    }
}
コード例 #6
0
ファイル: IntrHashSet.hpp プロジェクト: QC-git/MyLab
 ConstIterator Find(const T& value)const
 {
   uint32_t hidx=getIndex(&value);
   Node*const* nodePtr=&hash[hidx];
   if(!*nodePtr)return ConstIterator(0);
   if(TRAITS::isEqual((*nodePtr),&value))
   {
     return ConstIterator(this,hidx,*nodePtr,nodePtr);
   }
   Node*const* parentPtr=nodePtr;
   Node* node=(Node*)(*nodePtr)->ihsNextNode;
   while(node)
   {
     if(TRAITS::isEqual(node,&value))
     {
       return ConstIterator(this,hidx,node,parentPtr);
     }
     parentPtr=nodePtr;
     nodePtr=(Node**)&node->ihsNextNode;
     node=(Node*)node->ihsNextNode;
   }
   return ConstIterator(0);
 }
コード例 #7
0
ファイル: ImfChannelList.cpp プロジェクト: Archeleus/rrender
void
ChannelList::channelsWithPrefix (const char prefix[],
				 ConstIterator &first,
				 ConstIterator &last) const
{
    first = last = _map.lower_bound (prefix);
    int n = strlen (prefix);

    while (last != ConstIterator (_map.end()) &&
	   strncmp (last.name(), prefix, n) <= 0)
    {
	++last;
    }
}
コード例 #8
0
			ConstIterator find(const Key_T &key) const 
			{ 
				Node* current_node;
				Node* fallback_node = levels;

				for(int i = (MaxLevel - 1); i >= 0; i--)
				{
					current_node = fallback_node;
					while(current_node != NULL)
					{
						fallback_node = current_node;
						if(current_node->nodes[i] == NULL || current_node->nodes[i]->dataPair.first > key)
							break; // Next string on this node
						else if (current_node->nodes[i]->dataPair.first == key)
							return ConstIterator(current_node->nodes[i]);
						else if(current_node->nodes[i]->dataPair.first < key)
							current_node = current_node->nodes[i];
					}
				}
				return NULL;
			}
コード例 #9
0
ファイル: main.cpp プロジェクト: GHScan/DailyProjects
 ConstIterator begin() const { return ConstIterator(mInit, mStep, mSize); }
コード例 #10
0
ファイル: AddressableMatrix.hpp プロジェクト: sidch/DGP
 /** Get an iterator pointing to the beginning of the matrix. */
 ConstIterator begin() const { return ConstIterator(*this, 0, 0); }
コード例 #11
0
ファイル: AddressableMatrix.hpp プロジェクト: sidch/DGP
 /** Get an iterator pointing to the end of the matrix. */
 ConstIterator end() const { return ConstIterator(*this, (this->numColumns() > 0 ? this->numRows() : 0), 0); }
コード例 #12
0
			ConstIterator end() const
			{ 
				Node* temp = levels->nodes[0];
				while(temp != NULL) temp = temp->nodes[0];
				return ConstIterator(temp);
			}
コード例 #13
0
ファイル: AsioTcpSocket.cpp プロジェクト: quyse/inanity
	ConstIterator end() const
	{
		return ConstIterator(*this, endIt);
	}
コード例 #14
0
 ConstIterator operator()(BaseConstIterator iter) const
 {
     return ConstIterator(iter);
 }
コード例 #15
0
const PointListHandler::ConstIterator PointListHandler::end() const
{
	return ConstIterator(hash.end());
}
コード例 #16
0
mitk::IsoDoseLevelSet::ConstIterator mitk::IsoDoseLevelSet::Begin(void) const
{
  return ConstIterator(this->m_IsoLevels.begin());
}
コード例 #17
0
typename List<Type>::ConstIterator List<Type>::end(void) const
{
    // return an constant iterator just past the end
    return ConstIterator(&_sentinel);
}
コード例 #18
0
typename List<Type>::ConstIterator List<Type>::begin(void) const
{
    // return an constant iterator to the beginning
    return ConstIterator(_sentinel.next());
}
コード例 #19
0
typename SortedVectorMapStore<V>::ConstIterator SortedVectorMapStore<V>::CBegin() {
  return ConstIterator(entries_.get(),
                       entries_.get() + sizeof(Entry<V>) * num_entries_);
}
コード例 #20
0
ファイル: BinaryTreeIterator.hpp プロジェクト: perjoh/stuff
 const ConstIterator getRight() const {
     return ConstIterator( node_->getRight() );
 }
コード例 #21
0
ファイル: BinaryTreeIterator.hpp プロジェクト: perjoh/stuff
 const ConstIterator getLeft() const {
     return ConstIterator( node_->getLeft() );
 }
コード例 #22
0
ファイル: main.cpp プロジェクト: GHScan/DailyProjects
 ConstIterator end() const { return ConstIterator(mInit + mStep * mSize, mStep, 0); }
コード例 #23
0
ファイル: StaticList.hpp プロジェクト: novalabs/core-mw
 const ConstIterator
 begin() const
 {
     return ConstIterator(reinterpret_cast<const ConstLink*>(impl.get_head()));
 }
コード例 #24
0
ファイル: BasicTree.hpp プロジェクト: perjoh/stuff
 typename BasicTree<T>::ConstIterator BasicTree<T>::begin() const
 {
     return ConstIterator( *this );
 }
コード例 #25
0
ファイル: StaticList.hpp プロジェクト: novalabs/core-mw
 const ConstIterator
 end() const
 {
     return ConstIterator(nullptr);
 }
コード例 #26
0
ファイル: Set.hpp プロジェクト: netromdk/cods
typename Set<T>::ConstIterator Set<T>::cbegin() const
{
  return ConstIterator(map.cbegin());
}
コード例 #27
0
ファイル: AsioTcpSocket.cpp プロジェクト: quyse/inanity
	ConstIterator begin() const
	{
		return ConstIterator(*this, beginIt);
	}
コード例 #28
0
ファイル: Set.hpp プロジェクト: netromdk/cods
typename Set<T>::ConstIterator Set<T>::cend() const
{
  return ConstIterator(map.cend());
}
コード例 #29
0
mitk::IsoDoseLevelSet::ConstIterator mitk::IsoDoseLevelSet::End(void) const
{
  return ConstIterator(this->m_IsoLevels.end());
}
コード例 #30
0
			ConstIterator begin() const
			{ 
				return ConstIterator(levels->nodes[0]);
			}