Hurricane VLSI Database


CompareById Class Reference

Entity comparison criterion for STL container. More...

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:


Generated by doxygen 1.9.1 on Thu Aug 11 2022 Return to top of page
Hurricane VLSI Database Copyright © 2000-2020 Bull S.A. All rights reserved