FDO API Reference Feature Data Objects

template<class OBJ, class EXC>
virtual OBJ* FdoNamedCollection< OBJ, EXC >::FindItem const wchar_t *  name  )  const [inline, virtual]
 

Finds the item in the collection with the specified name.

Parameters:
name Input item name
Returns:
Returns the item in the collection with the specified name. Returns NULL if the item was not found.
trigger the building of a map when the collection reaches the threshold size.

Accessing the map is faster for large collections, so use it if built.

If the object name can't be modified then we're done. Otherwise, there's a chance the object name was modified, meaning that it can be in the collection but not the map, or in the wrong place in the map.

If the found object's name is the same as the given name then we're done. Otherwise, this object's name has changed and a linear search is needed to find the requested object.

No map so do linear search.

Definition at line 96 of file NamedCollection.h.

Referenced by FdoNamedCollection< FdoDictionaryElement, FdoException >::GetItem().


Comments or suggestions? Send us feedback.