NEPointerList* NEPointerList::getElementsWithTimePosition(const TYPE_TIMEPOSITION & timePosition) { assert(false); #ifdef BLABLA //## begin NEPointerList::getElementsWithTimePosition NEPointerList * list = new NEPointerList; GRNotationElement * e; GuidoPos pos=GetHeadPosition(); while(pos) { e = GetNext(pos); GRNotationElement * tmp = e->getGRNotationElementAtTimePosition(timePosition); if (tmp) list->push_back(tmp); } return list; //## end NEPointerList::getElementsWithTimePosition #endif return NULL; }
NEPointerList* NEPointerList::getElementsWithShortestDuration() { assert(!empty()); NEPointerList * list = new NEPointerList; GRNotationElement *e = NULL; GuidoPos pos=GetHeadPosition(); TYPE_DURATION dur(INT_MAX,1); while (pos) { e = GetNext(pos); if (e->getDuration() < dur) dur = e->getDuration(); } pos = GetHeadPosition(); while (pos) { e = GetNext(pos); if (e->getDuration() == dur) { list->push_back(e); } } return list; }