Lines Matching defs:key

48 	references to the entry's key/value. This allows EntryStrategy::Entry
79 status_t Insert(const Key &key, const Value &value);
80 status_t Put(const Key &key, const Value &value);
81 Value &Get(const Key &key);
82 const Value &Get(const Key &key) const;
84 int32 Remove(const Key &key);
98 Iterator Find(const Key &key);
99 ConstIterator Find(const Key &key) const;
100 Iterator FindClose(const Key &key, bool less);
101 ConstIterator FindClose(const Key &key, bool less) const;
104 int32 _FindInsertionIndex(const Key &key, bool &exists) const;
283 /*! \brief Associates a key with a value.
285 If there is already a value associated with the key, the old entry
288 \param key The key to which a value shall be associated.
289 \param value The value to be associated with the key.
294 relationship between key and value, that \a key and \a value haven't
299 _VECTOR_MAP_CLASS_NAME::Insert(const Key &key, const Value &value)
301 if (!fEntryStrategy.AreCompatible(key, value))
304 int32 index = _FindInsertionIndex(key, exists);
306 fElements[index] = fEntryStrategy.MakeEntry(key, value);
309 return fElements.Insert(fEntryStrategy.MakeEntry(key, value), index);
318 _VECTOR_MAP_CLASS_NAME::Put(const Key &key, const Value &value)
320 return Insert(key, value);
324 /*! \brief Returns the value associated with a given key.
326 \note Invoking this method for a key not know to the map is dangerous!
329 \param key The key to be looked up.
330 \return The value associated with \a key.
334 _VECTOR_MAP_CLASS_NAME::Get(const Key &key)
337 int32 index = _FindInsertionIndex(key, exists);
344 /*! \brief Returns the value associated with a given key.
346 \note Invoking this method for a key not know to the map is dangerous!
349 \param key The key to be looked up.
350 \return The value associated with \a key.
354 _VECTOR_MAP_CLASS_NAME::Get(const Key &key) const
357 int32 index = _FindInsertionIndex(key, exists);
364 /*! \brief Removes the entry with the supplied key.
365 \param key The key to be removed.
367 contained an entry with that key, \c 0 otherwise.
371 _VECTOR_MAP_CLASS_NAME::Remove(const Key &key)
374 int32 index = _FindInsertionIndex(key, exists);
528 specified key.
529 \param key The key of the entry to be found.
535 _VECTOR_MAP_CLASS_NAME::Find(const Key &key)
538 int32 index = _FindInsertionIndex(key, exists);
546 specified key.
547 \param key The key of the entry to be found.
553 _VECTOR_MAP_CLASS_NAME::Find(const Key &key) const
556 int32 index = _FindInsertionIndex(key, exists);
563 /*! \brief Returns an iterator referring to the entry with a key closest
566 If the map contains an entry with the specified key, an iterator
568 the entry with an directly smaller or greater key shall be returned.
571 key than the specified one, End() is returned. Similarly, when \a less
572 is \c false and the last entry's key is smaller. Find() invoked on an
575 Note, that the key order used for the set is specified as template
580 \param value The key of the entry to be found.
582 map doesn't contain any entry with the given key or a close
587 _VECTOR_MAP_CLASS_NAME::FindClose(const Key &key, bool less)
590 int32 index = _FindInsertionIndex(key, exists);
604 /*! \brief Returns an iterator referring to the entry with a key closest
607 If the map contains an entry with the specified key, an iterator
609 the entry with an directly smaller or greater key shall be returned.
612 key than the specified one, End() is returned. Similarly, when \a less
613 is \c false and the last entry's key is smaller. Find() invoked on an
616 Note, that the key order used for the set is specified as template
621 \param value The key of the entry to be found.
623 map doesn't contain any entry with the given key or a close
628 _VECTOR_MAP_CLASS_NAME::FindClose(const Key &key, bool less) const
631 int32 index = _FindInsertionIndex(key, exists);
645 /*! \brief Finds the index at which the entry with the supplied key is
647 \param key The key.
649 entry with that key, to \c false otherwise.
650 \return The index at which the entry with the supplied key is
655 _VECTOR_MAP_CLASS_NAME::_FindInsertionIndex(const Key &key,
664 key);
670 exists = (lower < Count() && fEntryStrategy.Compare(key,
688 Entry(const Key &key, const Value &value)
689 : key(key), value(value) {}
691 Key key;
697 return entry.key;
710 inline Entry MakeEntry(const Key &key, const Value &value) const
712 return Entry(key, value);
756 inline bool AreCompatible(const Key &key, const Value &value) const
758 return (fGetKey(value) == key);