------------------------------------------------------------------------------
| 196 | |
| 197 | //------------------------------------------------------------------------------ |
| 198 | int vtkCollection::IndexOfFirstOccurrence(vtkObject* a) const |
| 199 | { |
| 200 | if (!this->Top || !a) |
| 201 | { |
| 202 | return -1; |
| 203 | } |
| 204 | |
| 205 | vtkCollectionElement* elem = this->Top; |
| 206 | for (int i = 0; i < this->NumberOfItems; i++) |
| 207 | { |
| 208 | if (elem->Item == a) |
| 209 | { |
| 210 | return i; |
| 211 | } |
| 212 | else |
| 213 | { |
| 214 | elem = elem->Next; |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | return -1; |
| 219 | } |
| 220 | |
| 221 | //------------------------------------------------------------------------------ |
| 222 | int vtkCollection::IsItemPresent(vtkObject* a) VTK_FUTURE_CONST |
no outgoing calls