# Hurricane VLSI Database

List of all members
Hurricane::Entity::CompareById Class Reference

Entity comparison criterion for STL container. More...

Inherits binary_function< const Entity *, const Entity *, bool >.

## Detailed Description

Entity comparison criterion for STL container.

This class is a functor to be used in STL containers of `Entity*` whenever determinism is required (as an alternative to the object's pointer). If a `NULL` pointer is passed as argument, it's `id` is computed as zero, it is a failsafe and should be avoided.

typedef std::map<Net*,SomeValue,Entity::CompareById> NetMap;
NetMap netMap;
forEach( Net*, inet, cell->getNets() ) {
netMap.insert( std::make_pair(*inet,computeSomeValue(*inet)) );
}
for ( NetMap::iterator imap=netMap.begin() ; imap!=netMap.end() ; ++imap ) {
// Show the Net ordering
cout << (*imap).first->getId() << ":" << (*imap).first << endl;
// Do something
// ...
}

The documentation for this class was generated from the following file:

- Entity.h

Generated by doxygen 1.8.14 on Fri Oct 19 2018 | Return to top of page

Hurricane VLSI Database | Copyright © 2000-2016 Bull S.A. All rights reserved