models/cache/mcp-cache/hash_table.cpp
void hash_set::replace_entry (hash_entry *incoming, hash_entry *outgoing)
{
    list<hash_entry *>::iterator it;

    assert (incoming != NULL);
    assert (outgoing != NULL);


    for (it = set_entries.begin(); it != set_entries.end(); it++)
    {
        if ((*it)->tag == outgoing->tag)
        {
            set_entries.remove(outgoing);
            set_entries.push_front(incoming);
            break;
        }
    }
}
//! hash_set: replace_entry
//!
//! Replaces a line in the set with a new one fetched from lower level. Places
//! it at the front of the list so that it's ranked as MRU.
replace_entry
Replaces a line in the set with a new one fetched from lower level. Places
it at the front of the list so that it's ranked as MRU.
replace_entry Replaces a line in the set with a new one fetched from lower level . Places it at the front of the list so that it ' s ranked as MRU .
void hash_set::replace_entry (hash_entry *incoming, hash_entry *outgoing)
{
    list<hash_entry *>::iterator it;
    assert (incoming != NULL);
    assert (outgoing != NULL);
    for (it = set_entries.begin(); it != set_entries.end(); it++)
    {
        if ((*it)->tag == outgoing->tag)
        {
            set_entries.remove(outgoing);
            set_entries.push_front(incoming);
            break;
        }
    }
}
void hash_set :: replace_entry ( hash_entry * incoming , hash_entry * outgoing ) { list < hash_entry * > :: iterator it ; assert ( incoming != NULL ) ; assert ( outgoing != NULL ) ; for ( it = set_entries . begin ( ) ; it != set_entries . end ( ) ; it ++ ) { if ( ( * it ) -> tag == outgoing -> tag ) { set_entries . remove ( outgoing ) ; set_entries . push_front ( incoming ) ; break ; } } }
hash_set: replace_entry
Replaces a line in the set with a new one fetched from lower level.
hash_set : replace_entry Replaces a line in the set with a new one fetched from lower level .