// -*- C++ -*-
namespace Hurricane {
/*! \class SubSetCollection
* \brief SubSetCollection description (\b API)
*
* \section secSubSetCollectionIntro Introduction
*
* This collection allows you to get the subset of all elements
* which are accepted by a filter (this filter is indeed a
* functional object as illustrated below).
*
* In principle you don't need to use this collection directly,
* but through the call of collection.GetSubSet(filter)
* which builds this subset collection (for that reason we will
* not describe it).
*/
/*! \section secSubSetCollectionExample Example
*
* Definition of the filter which selects external nets of a
* cell :
\code
class IsExternal : public Filter {
// ***********************************
public:
IsExternal() {};
IsExternal(const IsExternal& isExternal) {};
IsExternal& operator=(const IsExternal& isExternal) {return *this;};
virtual Filter* GetClone() const {return new IsExternal(*this);};
virtual bool Accept(Net* net) const {return netIsExternal();};
};
\endcode
* Implementation of the accessor GetExternalNets for the
* cells :
\code
Nets Cell::GetExternalNet() const
// ******************************
{
return GetNets().GetSubSet(IsExternal());
}
\endcode
*/
/*! \section secSubSetCollectionRemarks Remarks
*
* As we will see, most objects define some handy filters. For
* instance, nets define the filter IsExternalFilter
* which can be obtained by calling the static member function
* Net::GetIsExternalFilter().
*
* Then, the GetExternalNets accessor for cells is
* written like this :
\code
Nets Cell::GetExternalNets() const
// *******************************
{
return GetNets().GetSubSet(Net::GetIsExternalFilter());
}
\endcode
*/
}