// -*- C++ -*- namespace Hurricane { /*! \class MapCollection * \brief MapCollection description (\b API) * * \section secMapCollectionIntro Introduction * * This collection allows you to handle a STL map as a * collection. * * In priciple you don't need to handle directly this * collection, you only need to handle a generic collection * bound to a MapCollection as created by the generic * function GetCollection(...) which builds one when its * argument is a STL map (for that reason we will not describe * it). * * * \section secMapCollectionOverloadingsOfTheGetcollectionGenericFunction Overloadings of the GetCollection generic function * * Hurricane::MapCollection::GetCollection * Hurricane::MapCollection::GetCollection * * * \section secMapCollectionRemarks Remarks * * Like for the other collections, there is no copy of the * elements included in the map, but instead a link from the * collection to the map. * * Once the collection as been built, you can perfectly modify * the map; the added or deleted elements will be taken into * account when visiting the map, as shown in the following * example : \code map netMap; Nets nets = GetCollection(netMap); // nets is then bound to the map netMap // and will reflect its content until the end // so we can : assert(nets.IsEmpty()); Cell* cell = ... // we get a cell if (cell) { Net* net = cellGetNet("vdd"); if (net) { netMap[netGetName()] = net; // and now : assert(nets.GetSize() == 1); } } \endcode * You can trace the collection and reach the elements of the * map, but you can't know to which key they are associated * (seldom useful). If this is required, you must use STL * iterators and not this collection. */ /*! \function GenericCollection MapCollection::GetCollection(const map& elementMap); * \see below. */ /*! \function GenericCollection MapCollection::GetCollection(const map* elementMap);; * Those two function return into generic collection bound to a * MapCollection the content of the STL map given in * argument. */ }