/// \brief
 ///   Returns the index of the specified component, or -1 if it is not in this collection
 inline int IndexOf(IVObjectComponent *pElement) const
 {
   IVObjectComponent** pPtrs = GetPtrs();
   for (int i=0;i<m_iElementCount;i++)
     if (pElement==pPtrs[i])
       return i;
   return -1;
 }
 /// \brief
 ///   Returns the element at specified index. The index must be in valid range.
 inline IVObjectComponent* GetAt(int iIndex) const 
 {
   VASSERT(iIndex>=0 && iIndex<m_iElementCount);
   return GetPtrs()[iIndex];
 }
Ejemplo n.º 3
0
void VMenuItemCollection::SortByPriority()
{
  qsort(GetPtrs(),Count(),sizeof(VDlgControlBase *),CompareItemPriority);
}