#ifndef PIXEL_RATING_GROUP_H #define PIXEL_RATING_GROUP_H #include #include using std::vector; namespace icl{ /// Provides abilities for individual combinations of pixleratings \ingroup G_CBS template class PixelRatingGroup : public PixelRating{ protected: /// internaly used type definition for the containded pixelratings typedef PixelRating pixelrating; /// internally used type definition for then member vector of pixelratings typedef std::vector PixelRatingVector; public: /// overwritten rate-function, calls combineRatings with all sub-results virtual RatingType rate(PixelType a, PixelType b, PixelType c){ for(unsigned int i=0;irate(a,b,c); } return combineRatings(m_vecSubResults); } /// deletes all contained pixelratings virtual ~PixelRatingGroup(){ for(unsigned int i=0;i &vec ){ (void)vec; return RatingType(); } /// adds a new pixelrating to the group (which takes possession of it) virtual void addPR(pixelrating *p){ m_vecSubResults.push_back(0); m_vecPR.push_back(p); } /// removed and deletes the pixelrating at index int removePR(int index){ if(index == -1){ for(unsigned int i=0;i m_vecSubResults; PixelRatingVector m_vecPR; }; } #endif