Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

PRInt32 tmVector::Append ( void *  aElement  ) 

the index of the element added, if successful

-1 if an error occured during allocation of space

Definition at line 67 of file tmVector.cpp.

Referenced by tmTransactionManager::AddQueue(), tmQueue::AttachClient(), and tmQueue::PostTransaction().


  // make sure there is room
  if (mNext == mCapacity)
    if (NS_FAILED(Grow()))
      return -1;

  // put the element in the array
  mElements[mNext] = aElement;

  // encapsulates the index into a success value
  return mNext++; // post increment.

Generated by  Doxygen 1.6.0   Back to index