本文整理汇总了C++中ObjectList::GetNext方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjectList::GetNext方法的具体用法?C++ ObjectList::GetNext怎么用?C++ ObjectList::GetNext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjectList
的用法示例。
在下文中一共展示了ObjectList::GetNext方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FreeObjectList
void MManager::FreeObjectList( ObjectList* a_List )
{
ObjectList* list = a_List;
while (list->GetNext()) list = list->GetNext();
list->SetNext( m_OList );
m_OList = a_List;
}
示例2: DrawVoice
//--------------------------------------------------------------------------
void PianoRollTrajectory::DrawVoice(ARMusicalVoice* v, DrawParams &drawParams)
{
if (fVoicesColors != NULL) {
int voiceNum = v->getVoiceNum();
for (unsigned int i = 0; i < fVoicesColors->size() && fColors->empty(); i++) {
std::pair<int, VGColor *> pair = fVoicesColors->at(i);
if (pair.first == voiceNum)
fColors->push(pair.second);
}
}
if (!fColors->empty() || fVoicesAutoColored) {
if (fColors->empty()) {
int r, g, b;
drawParams.colorHue += kGoldenRatio;
drawParams.colorHue = fmod(drawParams.colorHue, 1);
HSVtoRGB((float) drawParams.colorHue, 0.5f, 0.9f, r, g, b);
fColors->push(new VGColor(r, g, b, 255));
}
drawParams.dev->PushFillColor(*fColors->top());
}
fChord = false;
ObjectList *ol = (ObjectList *) v;
GuidoPos pos = ol->GetHeadPosition();
TYPE_DURATION finalDur;
while(pos)
{
ARMusicalObject *e = ol->GetNext(pos);
TYPE_DURATION dur = e->getDuration();
TYPE_TIMEPOSITION date = e->getRelativeTimePosition();
finalDur = (dur ? dur : finalDur);
if (fChord) {
dur = fChordDuration;
date -= dur;
}
TYPE_TIMEPOSITION end = date + dur;
if (date >= fStartDate) {
if (date < fEndDate) {
if (end > fEndDate)
dur = fEndDate - date;
DrawMusicalObject(e, date, dur, drawParams);
}
}
else if (end > fStartDate) { // to make the note end appear
date = fStartDate;
if (end > fEndDate)
dur = fEndDate - date;
else
dur = end - date;
DrawMusicalObject(e, date, dur, drawParams);
}
if (static_cast<ARRest *>(e->isARRest())) {
handleRest(date, drawParams);
fChord = false;
}
else if (static_cast<ARChordComma *>(e->isARChordComma()))
fChord = true;
else if (static_cast<ARNoteFormat *>(e->isARNoteFormat()))
handleColor(static_cast<ARNoteFormat *>(e->isARNoteFormat()), drawParams);
else if (static_cast<ARBar *>(e->isARBar()) && fMeasureBarsEnabled)
DrawMeasureBar(date, drawParams);
}
DrawLinks(drawParams); // Draws link to final event
DrawFinalEvent(finalDur, drawParams); // Draws link after final event
while (!fColors->empty())
popColor(drawParams);
previousEventInfos->clear();
currentEventInfos->clear();
fCurrentDate = 0;
}