本文整理汇总了C++中MarkerList::getMarker方法的典型用法代码示例。如果您正苦于以下问题:C++ MarkerList::getMarker方法的具体用法?C++ MarkerList::getMarker怎么用?C++ MarkerList::getMarker使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MarkerList
的用法示例。
在下文中一共展示了MarkerList::getMarker方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setMarker
void MarkerList::ValueTreeWrapper::readFrom (const MarkerList& markerList, UndoManager* undoManager)
{
state.removeAllChildren (undoManager);
for (int i = 0; i < markerList.getNumMarkers(); ++i)
setMarker (*markerList.getMarker(i), undoManager);
}
示例2: jassert
bool MarkerList::operator== (const MarkerList& other) const noexcept
{
if (other.markers.size() != markers.size())
return false;
for (int i = markers.size(); --i >= 0;)
{
const Marker* const m1 = markers.getUnchecked(i);
jassert (m1 != nullptr);
const Marker* const m2 = other.getMarker (m1->name);
if (m2 == nullptr || *m1 != *m2)
return false;
}
return true;
}
示例3: marker
//==============================================================================
void MarkerList::ValueTreeWrapper::applyTo (MarkerList& markerList)
{
const int numMarkers = getNumMarkers();
StringArray updatedMarkers;
for (int i = 0; i < numMarkers; ++i)
{
const ValueTree marker (state.getChild (i));
const String name (marker [nameProperty].toString());
markerList.setMarker (name, RelativeCoordinate (marker [posProperty].toString()));
updatedMarkers.add (name);
}
for (int i = markerList.getNumMarkers(); --i >= 0;)
if (! updatedMarkers.contains (markerList.getMarker (i)->name))
markerList.removeMarker (i);
}