Compartilhar via


CRBTree::GetAt

Call this method to get the element at a given position in the tree.

CPair* GetAt( 
   POSITION pos  
) throw( ); 
const CPair* GetAt( 
   POSITION pos  
) const throw( ); 
void GetAt( 
   POSITION pos, 
   KOUTARGTYPE key, 
   VOUTARGTYPE value  
) const;

Parameters

  • pos
    The position value.

  • key
    The variable that receives the key.

  • value
    The variable that receives the value.

Return Value

The first two forms return a pointer to a CPair. The third form obtains a key and a value for the given position.

Remarks

The position value can be previously determined with a call to a method such as CRBTree::GetHeadPosition or CRBTree::GetTailPosition.

In debug builds, an assertion failure will occur if pos is equal to NULL.

Requirements

Header: atlcoll.h

See Also

Reference

CRBTree Class

CRBTree::GetValueAt

CRBTree::GetKeyAt

CRBTree::SetValueAt