ROOT logo
// @(#)root/cont:$Id: TRefArray.cxx 34226 2010-06-30 12:03:31Z brun $
// Author: Rene Brun  02/10/2001

/*************************************************************************
 * Copyright (C) 1995-2001, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

////////////////////////////////////////////////////////////////////////////
//                                                                        //
// TRefArray                                                              //
//                                                                        //
// An array of references to TObjects. The array expands automatically    //
// when  objects are added (shrinking can be done by hand using Expand() )//
//                                                                        //
// The TRefArray can be filled with:                                      //
//     array.Add(obj)                                                     //
//     array.AddAt(obj,i)                                                 //
//     but not array[i] = obj  !!!                                        //
//                                                                        //
// The array elements can be retrieved with:                              //
//     TObject *obj = array.At(i);                                        //
//                                                                        //
// By default the TRefArray 'points' to the current process and can only  //
// receive object that have been created in this process.                 //
// To point the TRefArray to a different process do:                      //
//     TRefArray array( processId );                                      //
//                                                                        //
// For example, if 'obj' is an instance that was created in the different //
// process and you do:                                                    //
//     TRefArray array( TProcessID::GetProcessWithUID( obj ) );           //
// Then                                                                   //
//     array.Add(obj);                                                    //
// is correct (obj comes from the process the array is pointed to         //
// while                                                                  //
//     TObject *nobj = new TObject;                                       //
//     array.Add(nobj);                                                   //
// is incorrect since 'nobj' was created in a different process than the  //
// one the array is pointed to. In this case you will see error message:  //
//     Error in <TRefArray::AddAtAndExpand>: The object at 0x... is not   //
//     registered in the process the TRefArray point to                   //
//     (pid = ProcessID../....)                                           //
//                                                                        //
// When a TRefArray is Streamed, only the pointer unique id is written,   //
// not the referenced object. TRefArray may be assigned to different      //
// branches of one Tree or several Trees.                                 //
// The branch containing the TRefArray can be read before or after the    //
// array (eg TClonesArray, STL vector,..) of the referenced objects.      //
//                                                                        //
// See an example in $ROOTSYS/test/Event.h                                //
//                                                                        //
// RESTRICTIONS when using TRefArray                                      //
// ---------------------------------                                      //
//  - Elements in a TRefArray cannot point to a TFile or TDirectory.      //
//  - All elements of a TRefArray must be set in the same process,        //
//    In particular, one cannot modify some elements of the array in      //
//    a different process.                                                //
// Use an array of TRef when one of the above restrictions is met.        //
//                                                                        //
////////////////////////////////////////////////////////////////////////////

#include "TRefArray.h"
#include "TRefTable.h"
#include "TError.h"
#include "TBits.h"
#include "TSystem.h"
#include "TROOT.h"

ClassImp(TRefArray)

//______________________________________________________________________________
TRefArray::TRefArray(TProcessID *pid)
{
   // default constructor

   fPID  = pid ? pid : TProcessID::GetSessionProcessID();
   fUIDs = 0;
   fSize = 0;
   fLast = -1;
   fLowerBound = 0;
   Changed();
}

//______________________________________________________________________________
TRefArray::TRefArray(Int_t s, TProcessID *pid)
{
   // Create an object array. Using s one can set the array size
   // and lowerBound can be used to set the array lowerbound
   // index (default is 0).

   if (s < 0) {
      Warning("TRefArray", "size (%d) < 0", s);
      s = TCollection::kInitCapacity;
   }

   fPID  = pid ? pid : TProcessID::GetSessionProcessID();
   fUIDs = 0;
   Init(s, 0);
}

//______________________________________________________________________________
TRefArray::TRefArray(Int_t s, Int_t lowerBound, TProcessID *pid)
{
   // Create an object array. Using s one can set the array size
   // and lowerBound can be used to set the array lowerbound
   // index (default is 0).

   if (s < 0) {
      Warning("TRefArray", "size (%d) < 0", s);
      s = TCollection::kInitCapacity;
   }

   fPID  = pid ? pid : TProcessID::GetSessionProcessID();
   fUIDs = 0;
   Init(s, lowerBound);
}

//______________________________________________________________________________
TRefArray::TRefArray(const TRefArray &a) : TSeqCollection()
{
   // Create a copy of TRefArray a.

   fPID  = a.fPID;
   fUIDs = 0;
   Init(a.fSize, a.fLowerBound);

   for (Int_t i = 0; i < fSize; i++)
      fUIDs[i] = a.fUIDs[i];

   fLast = a.fLast;
   fName = a.fName;
}

//______________________________________________________________________________
TRefArray& TRefArray::operator=(const TRefArray &a)
{
   // Assignment operator.

   if (this != &a) {
      // Copy this by hand because the assigment operator
      // of TCollection is private
      fName   = a.fName;
      fSize   = a.fSize;
      fSorted = a.fSorted;

      fPID = a.fPID;
      Init(a.fSize, a.fLowerBound);

      for (Int_t i = 0; i < fSize; i++)
         fUIDs[i] = a.fUIDs[i];

      fLast = a.fLast;
      fName = a.fName;
   }
   return *this;
}

//______________________________________________________________________________
TRefArray::~TRefArray()
{
   // Usual destructor (The object pointed to by the array are never deleted).

   if (fUIDs) delete [] fUIDs;
   fPID  = 0;
   fUIDs = 0;
   fSize = 0;
}

//______________________________________________________________________________
static Bool_t R__GetUID(Int_t &uid, TObject *obj, TProcessID *pid, const char *methodname)
{
   // Private/static function, check for validity of pid.

   // Check if the object can belong here.
   Bool_t valid = kTRUE;
   if (obj->TestBit(kHasUUID)) {
      valid = kFALSE;
   } else if (obj->TestBit(kIsReferenced)) {
      valid = (pid == TProcessID::GetProcessWithUID(obj));
      if (valid) {
         uid = obj->GetUniqueID();
      }
   } else {
      valid = (pid == TProcessID::GetSessionProcessID());
      if (valid) {
         uid = TProcessID::AssignID(obj);
      }
   }

   if (!valid) {
      TString name; name.Form("TRefArray::%s",methodname);
      ::Error(name,
              "The object at %p is not registered in the process the TRefArray point to (pid = %s/%s)",obj,pid->GetName(),pid->GetTitle());
   }
   return valid;
}

//______________________________________________________________________________
void TRefArray::AddFirst(TObject *obj)
{
   // Add object in the first slot of the array. This will overwrite the
   // first element that might have been there. To have insertion semantics
   // use either a TList or a TOrdCollection.

   if (!obj) return;

   // Check if the object can belong here
   Int_t uid;
   if (R__GetUID(uid, obj, fPID, "AddFirst")) {
      fUIDs[0] = uid;
      Changed();
   }
}

//______________________________________________________________________________
void TRefArray::AddLast(TObject *obj)
{
   // Add object in the next empty slot in the array. Expand the array
   // if necessary.

   AddAtAndExpand(obj, GetAbsLast()+1+fLowerBound);
}

//______________________________________________________________________________
void TRefArray::AddBefore(const TObject *before, TObject *obj)
{
   // Add object in the slot before object before. If before=0 add object
   // in the first slot. Note that this will overwrite any object that
   // might have already been in this slot. For insertion semantics use
   // either a TList or a TOrdCollection.

   if (!before)
      AddFirst(obj);
   else {
      Int_t idx = IndexOf(before) - fLowerBound;
      if (idx == -1) {
         Error("AddBefore", "before not found, object not added");
         return;
      }
      if (idx == 0) {
         Error("AddBefore", "cannot add before lowerbound (%d)", fLowerBound);
         return;
      }
      AddAt(obj, idx+fLowerBound-1);
   }
}

//______________________________________________________________________________
void TRefArray::AddAfter(const TObject *after, TObject *obj)
{
   // Add object in the slot after object after. If after=0 add object in
   // the last empty slot. Note that this will overwrite any object that
   // might have already been in this slot. For insertion semantics use
   // either a TList or a TOrdCollection.

   if (!after)
      AddLast(obj);
   else {
      Int_t idx = IndexOf(after) - fLowerBound;
      if (idx == -1) {
         Error("AddAfter", "after not found, object not added");
         return;
      }
      AddAtAndExpand(obj, idx+fLowerBound+1);
   }
}

//______________________________________________________________________________
void TRefArray::AddAtAndExpand(TObject *obj, Int_t idx)
{
   // Add object at position idx. If idx is larger than the current size
   // of the array, expand the array (double its size).

   if (!obj) return;
   if (idx < fLowerBound) {
      Error("AddAt", "out of bounds at %d in %lx", idx, (Long_t)this);
      return;
   }
   if (idx-fLowerBound >= fSize)
      Expand(TMath::Max(idx-fLowerBound+1, GrowBy(fSize)));

   // Check if the object can belong here
   Int_t uid;
   if (R__GetUID(uid, obj, fPID, "AddAtAndExpand")) {
      fUIDs[idx-fLowerBound] = uid;
      fLast = TMath::Max(idx-fLowerBound, GetAbsLast());
      Changed();
   }
}

//______________________________________________________________________________
void TRefArray::AddAt(TObject *obj, Int_t idx)
{
   // Add object at position ids. Give an error when idx is out of bounds
   // (i.e. the array is not expanded).

   if (!obj) return;
   if (!BoundsOk("AddAt", idx)) return;

   // Check if the object can belong here
   Int_t uid;
   if (R__GetUID(uid, obj, fPID, "AddAt")) {
      fUIDs[idx-fLowerBound] = uid;;
      fLast = TMath::Max(idx-fLowerBound, GetAbsLast());
      Changed();
   }
}

//______________________________________________________________________________
Int_t  TRefArray::AddAtFree(TObject *obj)
{
   // Return the position of the new object.
   // Find the first empty cell or AddLast if there is no empty cell

   if (!obj) return 0;
   if (Last()) {    // <---------- This is to take in account "empty" TRefArray's
      Int_t i;
      for (i = 0; i < fSize; i++)
         if (!fUIDs[i]) {         // Add object at position i
            // Check if the object can belong here
            Int_t uid;
            if (R__GetUID(uid, obj, fPID, "AddAtFree")) {
               fUIDs[i] = uid;
               fLast = TMath::Max(i, GetAbsLast());
               Changed();
               return i+fLowerBound;
            }
         }
   }
   AddLast(obj);
   return GetLast();
}

//______________________________________________________________________________
TObject *TRefArray::After(const TObject *obj) const
{
   // Return the object after obj. Returns 0 if obj is last object.

   if (!obj || !fPID) return 0;

   Int_t idx = IndexOf(obj) - fLowerBound;
   if (idx == -1 || idx == fSize-1) return 0;

   return fPID->GetObjectWithID(fUIDs[idx+1]);
}

//______________________________________________________________________________
TObject *TRefArray::Before(const TObject *obj) const
{
   // Return the object before obj. Returns 0 if obj is first object.

   if (!obj || !fPID) return 0;

   Int_t idx = IndexOf(obj) - fLowerBound;
   if (idx == -1 || idx == 0) return 0;

   return fPID->GetObjectWithID(fUIDs[idx-1]);
}

//______________________________________________________________________________
void TRefArray::Clear(Option_t *)
{
   // Remove all objects from the array.

   fLast = - 1;

   for (Int_t j=0 ; j < fSize; j++) fUIDs[j] = 0;

   Changed();
}

//______________________________________________________________________________
void TRefArray::Compress()
{
   // Remove empty slots from array.

   Int_t j = 0;

   for (Int_t i = 0; i < fSize; i++) {
      if (fUIDs[i]) {
         fUIDs[j] = fUIDs[i];
         j++;
      }
   }

   fLast = j - 1;

   for ( ; j < fSize; j++) fUIDs[j] = 0;
}

//______________________________________________________________________________
void TRefArray::Delete(Option_t *)
{
   // Remove all objects from the array and free the internal memory.

   fLast = -1;

   fSize = 0;
   if (fUIDs) {
      delete [] fUIDs;
      fUIDs = 0;
   }

   Changed();
}

//______________________________________________________________________________
void TRefArray::Expand(Int_t newSize)
{
   // Expand or shrink the array to newSize elements.

   if (newSize < 0) {
      Error ("Expand", "newSize must be positive (%d)", newSize);
      return;
   }
   if (newSize == fSize) return;
   UInt_t *temp = fUIDs;
   if (newSize != 0) {
      fUIDs = new UInt_t[newSize];
      if (newSize < fSize) memcpy(fUIDs,temp, newSize*sizeof(UInt_t));
      else {
         memcpy(fUIDs,temp,fSize*sizeof(UInt_t));
         memset(&fUIDs[fSize],0,(newSize-fSize)*sizeof(UInt_t));
      }
   } else {
      fUIDs = 0;
   }
   if (temp) delete [] temp;
   fSize = newSize;
}

//______________________________________________________________________________
TObject *TRefArray::GetFromTable(Int_t idx) const
{
   //the reference may be in the TRefTable
   TRefTable *table = TRefTable::GetRefTable();
   if (table) {
      table->SetUID(fUIDs[idx], fPID);
      table->Notify();
      return fPID->GetObjectWithID(fUIDs[idx]);
   }
   return 0;
}

//_______________________________________________________________________
void TRefArray::Streamer(TBuffer &R__b)
{
   // Stream all objects in the array to or from the I/O buffer.

   UInt_t R__s, R__c;
   Int_t nobjects;
   UShort_t pidf;
   if (R__b.IsReading()) {
      R__b.ReadVersion(&R__s, &R__c);
      TObject::Streamer(R__b);
      fName.Streamer(R__b);
      R__b >> nobjects;
      R__b >> fLowerBound;
      if (nobjects >= fSize) Expand(nobjects);
      fLast = -1;
      R__b >> pidf;
      pidf += R__b.GetPidOffset();
      fPID = R__b.ReadProcessID(pidf);
      if (gDebug > 1) printf("Reading TRefArray, pidf=%d, fPID=%lx, nobjects=%d\n",pidf,(Long_t)fPID,nobjects);
      for (Int_t i = 0; i < nobjects; i++) {
         R__b >> fUIDs[i];
         if (fUIDs[i] != 0) fLast = i;
         if (gDebug > 1) {
            printf(" %d",fUIDs[i]);
            if ((i > 0 && i%10 == 0) || (i == nobjects-1)) printf("\n");
         }
      }
      Changed();
      R__b.CheckByteCount(R__s, R__c,TRefArray::IsA());
   } else {
      R__c = R__b.WriteVersion(TRefArray::IsA(), kTRUE);
      TObject::Streamer(R__b);
      fName.Streamer(R__b);
      nobjects = GetAbsLast()+1;
      R__b << nobjects;
      R__b << fLowerBound;
      pidf = R__b.WriteProcessID(fPID);
      R__b << pidf;
      if (gDebug > 1) printf("Writing TRefArray, pidf=%d, fPID=%lx, nobjects=%d\n",pidf,(Long_t)fPID,nobjects);

      for (Int_t i = 0; i < nobjects; i++) {
         R__b << fUIDs[i];
         if (gDebug > 1) {
            printf(" %d",fUIDs[i]);
            if ((i > 0 && i%10 == 0) || (i == nobjects-1)) printf("\n");
         }
      }
      R__b.SetByteCount(R__c, kTRUE);
   }
}

//______________________________________________________________________________
TObject *TRefArray::First() const
{
   // Return the object in the first slot.

   return fPID->GetObjectWithID(fUIDs[0]);
}

//______________________________________________________________________________
TObject *TRefArray::Last() const
{
   // Return the object in the last filled slot. Returns 0 if no entries.

   if (fLast == -1)
      return 0;
   else
      return fPID->GetObjectWithID(fUIDs[GetAbsLast()]);
}

//______________________________________________________________________________
Int_t TRefArray::GetEntries() const
{
   // Return the number of objects in array (i.e. number of non-empty slots).
   // Attention: use this method ONLY if you want to know the number of
   // non-empty slots. This function loops over the complete array and
   // is therefore very slow when applied in a loop. Most of the time you
   // better use GetLast()+1.

   Int_t cnt = 0;

   for (Int_t i = 0; i < fSize; i++)
      if (fUIDs[i]) cnt++;

   return cnt;
}

//______________________________________________________________________________
Int_t TRefArray::GetAbsLast() const
{
   // Return absolute index to last object in array. Returns -1 in case
   // array is empty.

   // For efficiency we need sometimes to update fLast so we have
   // to cast const away. Ugly, but making GetAbsLast() not const breaks
   // many other const functions.
   if (fLast == -2) {
      for (Int_t i = fSize-1; i >= 0; i--)
         if (fUIDs[i]) {
            ((TRefArray*)this)->fLast = i;
            return fLast;
         }
      ((TRefArray*)this)->fLast = -1;
   }
   return fLast;
}

//______________________________________________________________________________
Int_t TRefArray::GetLast() const
{
   // Return index of last object in array. Returns lowerBound-1 in case
   // array is empty.

   return fLowerBound+GetAbsLast();
}

//______________________________________________________________________________
TObject **TRefArray::GetObjectRef(const TObject *) const
{
   // Return address of pointer obj.

   //Int_t index = IndexOf(obj);
   //return &fCont[index];
   return 0;
}

//______________________________________________________________________________
UInt_t TRefArray::GetUID(Int_t at) const
{
   // Return UID of element at.

   int j = at-fLowerBound;
   if (j >= 0 && j < fSize) {
      if (!fPID) return 0;
      return fUIDs[j];
   }
   BoundsOk("At", at);
   return 0;
}

//______________________________________________________________________________
Int_t TRefArray::IndexOf(const TObject *obj) const
{
   // obj != 0 Return index of object in array.
   //          Returns lowerBound-1 in case array doesn't contain the obj.
   //
   // obj == 0 Return the index of the first empty slot.
   //          Returns lowerBound-1 in case array doesn't contain any empty slot.

   Int_t i;
   if (obj) {
      for (i = 0; i < fSize; i++)
         if (fUIDs[i] && fPID->GetObjectWithID(fUIDs[i]) == obj)
            return i+fLowerBound;
   } else {    // Look for the first empty slot
      for (i = 0; i < fSize; i++)
         if (!fUIDs[i])
            return i+fLowerBound;
   }

   return fLowerBound-1;
}

//______________________________________________________________________________
void TRefArray::Init(Int_t s, Int_t lowerBound)
{
   // Initialize a TRefArray.

   if (fUIDs && fSize != s) {
      delete [] fUIDs;
      fUIDs = 0;
   }

   fSize = s;

   if (fSize) {
      fUIDs = new UInt_t[fSize];
      for (Int_t i=0;i<s;i++) fUIDs[i] = 0;
   } else {
      fUIDs = 0;
   }
   fLowerBound = lowerBound;
   fLast = -1;
   Changed();
}

//______________________________________________________________________________
TIterator *TRefArray::MakeIterator(Bool_t dir) const
{
   // Returns an array iterator.

   return new TRefArrayIter(this, dir);
}

//______________________________________________________________________________
Bool_t TRefArray::OutOfBoundsError(const char *where, Int_t i) const
{
   // Generate an out-of-bounds error. Always returns false.

   Error(where, "index %d out of bounds (size: %d, this: 0x%lx)", i, fSize, (Long_t)this);
   return kFALSE;
}

//______________________________________________________________________________
TObject *TRefArray::RemoveAt(Int_t idx)
{
   // Remove object at index idx.

   if (!BoundsOk("RemoveAt", idx)) return 0;

   int i = idx-fLowerBound;

   TObject *obj = 0;
   if (fUIDs[i]) {
      obj = fPID->GetObjectWithID(fUIDs[i]);
      fUIDs[i] = 0;
      // recalculate array size
      if (i == fLast)
         do {
            fLast--;
         } while (fLast >= 0 && fUIDs[fLast] == 0);
      Changed();
   }

   return obj;
}

//______________________________________________________________________________
TObject *TRefArray::Remove(TObject *obj)
{
   // Remove object from array.

   if (!obj) return 0;

   Int_t idx = IndexOf(obj) - fLowerBound;

   if (idx == -1) return 0;

   TObject *ob = fPID->GetObjectWithID(fUIDs[idx]);
   fUIDs[idx] = 0;
   // recalculate array size
   if (idx == fLast)
      do {
         fLast--;
      } while (fLast >= 0 && fUIDs[fLast] == 0);
   Changed();
   return ob;
}

//______________________________________________________________________________
void TRefArray::SetLast(Int_t last)
{
   // Set index of last object in array, effectively truncating the
   // array. Use carefully since whenever last position has to be
   // recalculated, e.g. after a Remove() or Sort() it will be reset
   // to the last non-empty slot. If last is -2 this will force the
   // recalculation of the last used slot.

   if (last == -2)
      fLast = -2;
   else if (BoundsOk("SetLast", last))
      fLast = last - fLowerBound;
}

//______________________________________________________________________________
void TRefArray::Sort(Int_t)
{
   // If objects in array are sortable (i.e. IsSortable() returns true
   // for all objects) then sort array.

   Error("Sort","Function not yet implemented");
/*
   if (GetAbsLast() == -1 || fSorted) return;
   for (Int_t i = 0; i < fSize; i++)
      if (fUIDs[i]) {
         if (!fUIDs[i]->IsSortable()) {
            Error("Sort", "objects in array are not sortable");
            return;
         }
      }

   QSort(fUIDs, 0, TMath::Min(fSize, upto-fLowerBound));

   fLast   = -2;
   fSorted = kTRUE;
*/
}

//______________________________________________________________________________
Int_t TRefArray::BinarySearch(TObject *, Int_t)
{
   // Find object using a binary search. Array must first have been sorted.
   // Search can be limited by setting upto to desired index.

   Error("BinarySearch","Function not yet implemented");
/*
   Int_t   base, position, last, result = 0;
   TObject *op2;

   if (!op) return -1;

   if (!fSorted) {
      Error("BinarySearch", "array must first be sorted");
      return -1;
   }

   base = 0;
   last = TMath::Min(fSize, upto-fLowerBound) - 1;

   while (last >= base) {
      //position = (base+last) / 2;
      //op2 = fCont[position];
      //if (op2 && (result = op->Compare(op2)) == 0)
      //   return position + fLowerBound;
      //if (!op2 || result < 0)
      //   last = position-1;
      //else
      //   base = position+1;
   }
*/
   return -1;
}


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TRefArrayIter                                                        //
//                                                                      //
// Iterator of object array.                                            //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

ClassImp(TRefArrayIter)

//______________________________________________________________________________
TRefArrayIter::TRefArrayIter(const TRefArray *arr, Bool_t dir)
{
   // Create array iterator. By default the iteration direction
   // is kIterForward. To go backward use kIterBackward.

   fArray     = arr;
   fDirection = dir;
   Reset();
}

//______________________________________________________________________________
TRefArrayIter::TRefArrayIter(const TRefArrayIter &iter) : TIterator(iter)
{
   // Copy ctor.

   fArray     = iter.fArray;
   fDirection = iter.fDirection;
   fCursor    = iter.fCursor;
   fCurCursor = iter.fCurCursor;
}

//______________________________________________________________________________
TIterator &TRefArrayIter::operator=(const TIterator &rhs)
{
   // Overridden assignment operator.

   if (this != &rhs && rhs.IsA() == TRefArrayIter::Class()) {
      const TRefArrayIter &rhs1 = (const TRefArrayIter &)rhs;
      fArray     = rhs1.fArray;
      fDirection = rhs1.fDirection;
      fCursor    = rhs1.fCursor;
      fCurCursor = rhs1.fCurCursor;
   }
   return *this;
}

//______________________________________________________________________________
TRefArrayIter &TRefArrayIter::operator=(const TRefArrayIter &rhs)
{
   // Overloaded assignment operator.

   if (this != &rhs) {
      fArray     = rhs.fArray;
      fDirection = rhs.fDirection;
      fCursor    = rhs.fCursor;
      fCurCursor = rhs.fCurCursor;
   }
   return *this;
}

//______________________________________________________________________________
TObject *TRefArrayIter::Next()
{
   // Return next object in array. Returns 0 when no more objects in array.

   if (fDirection == kIterForward) {
      for ( ; fCursor < fArray->Capacity() && fArray->At(fCursor+fArray->LowerBound()) == 0;
              fCursor++) { }

      fCurCursor = fCursor;
      if (fCursor < fArray->Capacity()) {
         fCursor++;
         return fArray->At(fCurCursor+fArray->LowerBound());
      }
   } else {
      for ( ; fCursor >= 0 && fArray->At(fCursor) == 0;
              fCursor--) { }

      fCurCursor = fCursor;
      if (fCursor >= 0) {
         fCursor--;
         return fArray->At(fCurCursor+fArray->LowerBound());
      }
   }
   return 0;
}

//______________________________________________________________________________
void TRefArrayIter::Reset()
{
   // Reset array iterator.

   if (fDirection == kIterForward)
      fCursor = 0;
   else
      fCursor = fArray->Capacity() - 1;

   fCurCursor = fCursor;
}

//______________________________________________________________________________
bool TRefArrayIter::operator!=(const TIterator &aIter) const
{
   // This operator compares two TIterator objects.

   if (nullptr == (&aIter))
      return (fCurCursor < fArray->Capacity());

   if (aIter.IsA() == TRefArrayIter::Class()) {
      const TRefArrayIter &iter(dynamic_cast<const TRefArrayIter &>(aIter));
      return (fCurCursor != iter.fCurCursor);
   }
   return false; // for base class we don't implement a comparison
}

//______________________________________________________________________________
bool TRefArrayIter::operator!=(const TRefArrayIter &aIter) const
{
   // This operator compares two TRefArrayIter objects.

   if (nullptr == (&aIter))
      return (fCurCursor < fArray->Capacity());

   return (fCurCursor != aIter.fCurCursor);
}

//______________________________________________________________________________
TObject *TRefArrayIter::operator*() const
{
   // Return current object or nullptr.

   return (((fCurCursor >= 0) && (fCurCursor < fArray->Capacity())) ?
           fArray->At(fCurCursor) : nullptr);
}
 TRefArray.cxx:1
 TRefArray.cxx:2
 TRefArray.cxx:3
 TRefArray.cxx:4
 TRefArray.cxx:5
 TRefArray.cxx:6
 TRefArray.cxx:7
 TRefArray.cxx:8
 TRefArray.cxx:9
 TRefArray.cxx:10
 TRefArray.cxx:11
 TRefArray.cxx:12
 TRefArray.cxx:13
 TRefArray.cxx:14
 TRefArray.cxx:15
 TRefArray.cxx:16
 TRefArray.cxx:17
 TRefArray.cxx:18
 TRefArray.cxx:19
 TRefArray.cxx:20
 TRefArray.cxx:21
 TRefArray.cxx:22
 TRefArray.cxx:23
 TRefArray.cxx:24
 TRefArray.cxx:25
 TRefArray.cxx:26
 TRefArray.cxx:27
 TRefArray.cxx:28
 TRefArray.cxx:29
 TRefArray.cxx:30
 TRefArray.cxx:31
 TRefArray.cxx:32
 TRefArray.cxx:33
 TRefArray.cxx:34
 TRefArray.cxx:35
 TRefArray.cxx:36
 TRefArray.cxx:37
 TRefArray.cxx:38
 TRefArray.cxx:39
 TRefArray.cxx:40
 TRefArray.cxx:41
 TRefArray.cxx:42
 TRefArray.cxx:43
 TRefArray.cxx:44
 TRefArray.cxx:45
 TRefArray.cxx:46
 TRefArray.cxx:47
 TRefArray.cxx:48
 TRefArray.cxx:49
 TRefArray.cxx:50
 TRefArray.cxx:51
 TRefArray.cxx:52
 TRefArray.cxx:53
 TRefArray.cxx:54
 TRefArray.cxx:55
 TRefArray.cxx:56
 TRefArray.cxx:57
 TRefArray.cxx:58
 TRefArray.cxx:59
 TRefArray.cxx:60
 TRefArray.cxx:61
 TRefArray.cxx:62
 TRefArray.cxx:63
 TRefArray.cxx:64
 TRefArray.cxx:65
 TRefArray.cxx:66
 TRefArray.cxx:67
 TRefArray.cxx:68
 TRefArray.cxx:69
 TRefArray.cxx:70
 TRefArray.cxx:71
 TRefArray.cxx:72
 TRefArray.cxx:73
 TRefArray.cxx:74
 TRefArray.cxx:75
 TRefArray.cxx:76
 TRefArray.cxx:77
 TRefArray.cxx:78
 TRefArray.cxx:79
 TRefArray.cxx:80
 TRefArray.cxx:81
 TRefArray.cxx:82
 TRefArray.cxx:83
 TRefArray.cxx:84
 TRefArray.cxx:85
 TRefArray.cxx:86
 TRefArray.cxx:87
 TRefArray.cxx:88
 TRefArray.cxx:89
 TRefArray.cxx:90
 TRefArray.cxx:91
 TRefArray.cxx:92
 TRefArray.cxx:93
 TRefArray.cxx:94
 TRefArray.cxx:95
 TRefArray.cxx:96
 TRefArray.cxx:97
 TRefArray.cxx:98
 TRefArray.cxx:99
 TRefArray.cxx:100
 TRefArray.cxx:101
 TRefArray.cxx:102
 TRefArray.cxx:103
 TRefArray.cxx:104
 TRefArray.cxx:105
 TRefArray.cxx:106
 TRefArray.cxx:107
 TRefArray.cxx:108
 TRefArray.cxx:109
 TRefArray.cxx:110
 TRefArray.cxx:111
 TRefArray.cxx:112
 TRefArray.cxx:113
 TRefArray.cxx:114
 TRefArray.cxx:115
 TRefArray.cxx:116
 TRefArray.cxx:117
 TRefArray.cxx:118
 TRefArray.cxx:119
 TRefArray.cxx:120
 TRefArray.cxx:121
 TRefArray.cxx:122
 TRefArray.cxx:123
 TRefArray.cxx:124
 TRefArray.cxx:125
 TRefArray.cxx:126
 TRefArray.cxx:127
 TRefArray.cxx:128
 TRefArray.cxx:129
 TRefArray.cxx:130
 TRefArray.cxx:131
 TRefArray.cxx:132
 TRefArray.cxx:133
 TRefArray.cxx:134
 TRefArray.cxx:135
 TRefArray.cxx:136
 TRefArray.cxx:137
 TRefArray.cxx:138
 TRefArray.cxx:139
 TRefArray.cxx:140
 TRefArray.cxx:141
 TRefArray.cxx:142
 TRefArray.cxx:143
 TRefArray.cxx:144
 TRefArray.cxx:145
 TRefArray.cxx:146
 TRefArray.cxx:147
 TRefArray.cxx:148
 TRefArray.cxx:149
 TRefArray.cxx:150
 TRefArray.cxx:151
 TRefArray.cxx:152
 TRefArray.cxx:153
 TRefArray.cxx:154
 TRefArray.cxx:155
 TRefArray.cxx:156
 TRefArray.cxx:157
 TRefArray.cxx:158
 TRefArray.cxx:159
 TRefArray.cxx:160
 TRefArray.cxx:161
 TRefArray.cxx:162
 TRefArray.cxx:163
 TRefArray.cxx:164
 TRefArray.cxx:165
 TRefArray.cxx:166
 TRefArray.cxx:167
 TRefArray.cxx:168
 TRefArray.cxx:169
 TRefArray.cxx:170
 TRefArray.cxx:171
 TRefArray.cxx:172
 TRefArray.cxx:173
 TRefArray.cxx:174
 TRefArray.cxx:175
 TRefArray.cxx:176
 TRefArray.cxx:177
 TRefArray.cxx:178
 TRefArray.cxx:179
 TRefArray.cxx:180
 TRefArray.cxx:181
 TRefArray.cxx:182
 TRefArray.cxx:183
 TRefArray.cxx:184
 TRefArray.cxx:185
 TRefArray.cxx:186
 TRefArray.cxx:187
 TRefArray.cxx:188
 TRefArray.cxx:189
 TRefArray.cxx:190
 TRefArray.cxx:191
 TRefArray.cxx:192
 TRefArray.cxx:193
 TRefArray.cxx:194
 TRefArray.cxx:195
 TRefArray.cxx:196
 TRefArray.cxx:197
 TRefArray.cxx:198
 TRefArray.cxx:199
 TRefArray.cxx:200
 TRefArray.cxx:201
 TRefArray.cxx:202
 TRefArray.cxx:203
 TRefArray.cxx:204
 TRefArray.cxx:205
 TRefArray.cxx:206
 TRefArray.cxx:207
 TRefArray.cxx:208
 TRefArray.cxx:209
 TRefArray.cxx:210
 TRefArray.cxx:211
 TRefArray.cxx:212
 TRefArray.cxx:213
 TRefArray.cxx:214
 TRefArray.cxx:215
 TRefArray.cxx:216
 TRefArray.cxx:217
 TRefArray.cxx:218
 TRefArray.cxx:219
 TRefArray.cxx:220
 TRefArray.cxx:221
 TRefArray.cxx:222
 TRefArray.cxx:223
 TRefArray.cxx:224
 TRefArray.cxx:225
 TRefArray.cxx:226
 TRefArray.cxx:227
 TRefArray.cxx:228
 TRefArray.cxx:229
 TRefArray.cxx:230
 TRefArray.cxx:231
 TRefArray.cxx:232
 TRefArray.cxx:233
 TRefArray.cxx:234
 TRefArray.cxx:235
 TRefArray.cxx:236
 TRefArray.cxx:237
 TRefArray.cxx:238
 TRefArray.cxx:239
 TRefArray.cxx:240
 TRefArray.cxx:241
 TRefArray.cxx:242
 TRefArray.cxx:243
 TRefArray.cxx:244
 TRefArray.cxx:245
 TRefArray.cxx:246
 TRefArray.cxx:247
 TRefArray.cxx:248
 TRefArray.cxx:249
 TRefArray.cxx:250
 TRefArray.cxx:251
 TRefArray.cxx:252
 TRefArray.cxx:253
 TRefArray.cxx:254
 TRefArray.cxx:255
 TRefArray.cxx:256
 TRefArray.cxx:257
 TRefArray.cxx:258
 TRefArray.cxx:259
 TRefArray.cxx:260
 TRefArray.cxx:261
 TRefArray.cxx:262
 TRefArray.cxx:263
 TRefArray.cxx:264
 TRefArray.cxx:265
 TRefArray.cxx:266
 TRefArray.cxx:267
 TRefArray.cxx:268
 TRefArray.cxx:269
 TRefArray.cxx:270
 TRefArray.cxx:271
 TRefArray.cxx:272
 TRefArray.cxx:273
 TRefArray.cxx:274
 TRefArray.cxx:275
 TRefArray.cxx:276
 TRefArray.cxx:277
 TRefArray.cxx:278
 TRefArray.cxx:279
 TRefArray.cxx:280
 TRefArray.cxx:281
 TRefArray.cxx:282
 TRefArray.cxx:283
 TRefArray.cxx:284
 TRefArray.cxx:285
 TRefArray.cxx:286
 TRefArray.cxx:287
 TRefArray.cxx:288
 TRefArray.cxx:289
 TRefArray.cxx:290
 TRefArray.cxx:291
 TRefArray.cxx:292
 TRefArray.cxx:293
 TRefArray.cxx:294
 TRefArray.cxx:295
 TRefArray.cxx:296
 TRefArray.cxx:297
 TRefArray.cxx:298
 TRefArray.cxx:299
 TRefArray.cxx:300
 TRefArray.cxx:301
 TRefArray.cxx:302
 TRefArray.cxx:303
 TRefArray.cxx:304
 TRefArray.cxx:305
 TRefArray.cxx:306
 TRefArray.cxx:307
 TRefArray.cxx:308
 TRefArray.cxx:309
 TRefArray.cxx:310
 TRefArray.cxx:311
 TRefArray.cxx:312
 TRefArray.cxx:313
 TRefArray.cxx:314
 TRefArray.cxx:315
 TRefArray.cxx:316
 TRefArray.cxx:317
 TRefArray.cxx:318
 TRefArray.cxx:319
 TRefArray.cxx:320
 TRefArray.cxx:321
 TRefArray.cxx:322
 TRefArray.cxx:323
 TRefArray.cxx:324
 TRefArray.cxx:325
 TRefArray.cxx:326
 TRefArray.cxx:327
 TRefArray.cxx:328
 TRefArray.cxx:329
 TRefArray.cxx:330
 TRefArray.cxx:331
 TRefArray.cxx:332
 TRefArray.cxx:333
 TRefArray.cxx:334
 TRefArray.cxx:335
 TRefArray.cxx:336
 TRefArray.cxx:337
 TRefArray.cxx:338
 TRefArray.cxx:339
 TRefArray.cxx:340
 TRefArray.cxx:341
 TRefArray.cxx:342
 TRefArray.cxx:343
 TRefArray.cxx:344
 TRefArray.cxx:345
 TRefArray.cxx:346
 TRefArray.cxx:347
 TRefArray.cxx:348
 TRefArray.cxx:349
 TRefArray.cxx:350
 TRefArray.cxx:351
 TRefArray.cxx:352
 TRefArray.cxx:353
 TRefArray.cxx:354
 TRefArray.cxx:355
 TRefArray.cxx:356
 TRefArray.cxx:357
 TRefArray.cxx:358
 TRefArray.cxx:359
 TRefArray.cxx:360
 TRefArray.cxx:361
 TRefArray.cxx:362
 TRefArray.cxx:363
 TRefArray.cxx:364
 TRefArray.cxx:365
 TRefArray.cxx:366
 TRefArray.cxx:367
 TRefArray.cxx:368
 TRefArray.cxx:369
 TRefArray.cxx:370
 TRefArray.cxx:371
 TRefArray.cxx:372
 TRefArray.cxx:373
 TRefArray.cxx:374
 TRefArray.cxx:375
 TRefArray.cxx:376
 TRefArray.cxx:377
 TRefArray.cxx:378
 TRefArray.cxx:379
 TRefArray.cxx:380
 TRefArray.cxx:381
 TRefArray.cxx:382
 TRefArray.cxx:383
 TRefArray.cxx:384
 TRefArray.cxx:385
 TRefArray.cxx:386
 TRefArray.cxx:387
 TRefArray.cxx:388
 TRefArray.cxx:389
 TRefArray.cxx:390
 TRefArray.cxx:391
 TRefArray.cxx:392
 TRefArray.cxx:393
 TRefArray.cxx:394
 TRefArray.cxx:395
 TRefArray.cxx:396
 TRefArray.cxx:397
 TRefArray.cxx:398
 TRefArray.cxx:399
 TRefArray.cxx:400
 TRefArray.cxx:401
 TRefArray.cxx:402
 TRefArray.cxx:403
 TRefArray.cxx:404
 TRefArray.cxx:405
 TRefArray.cxx:406
 TRefArray.cxx:407
 TRefArray.cxx:408
 TRefArray.cxx:409
 TRefArray.cxx:410
 TRefArray.cxx:411
 TRefArray.cxx:412
 TRefArray.cxx:413
 TRefArray.cxx:414
 TRefArray.cxx:415
 TRefArray.cxx:416
 TRefArray.cxx:417
 TRefArray.cxx:418
 TRefArray.cxx:419
 TRefArray.cxx:420
 TRefArray.cxx:421
 TRefArray.cxx:422
 TRefArray.cxx:423
 TRefArray.cxx:424
 TRefArray.cxx:425
 TRefArray.cxx:426
 TRefArray.cxx:427
 TRefArray.cxx:428
 TRefArray.cxx:429
 TRefArray.cxx:430
 TRefArray.cxx:431
 TRefArray.cxx:432
 TRefArray.cxx:433
 TRefArray.cxx:434
 TRefArray.cxx:435
 TRefArray.cxx:436
 TRefArray.cxx:437
 TRefArray.cxx:438
 TRefArray.cxx:439
 TRefArray.cxx:440
 TRefArray.cxx:441
 TRefArray.cxx:442
 TRefArray.cxx:443
 TRefArray.cxx:444
 TRefArray.cxx:445
 TRefArray.cxx:446
 TRefArray.cxx:447
 TRefArray.cxx:448
 TRefArray.cxx:449
 TRefArray.cxx:450
 TRefArray.cxx:451
 TRefArray.cxx:452
 TRefArray.cxx:453
 TRefArray.cxx:454
 TRefArray.cxx:455
 TRefArray.cxx:456
 TRefArray.cxx:457
 TRefArray.cxx:458
 TRefArray.cxx:459
 TRefArray.cxx:460
 TRefArray.cxx:461
 TRefArray.cxx:462
 TRefArray.cxx:463
 TRefArray.cxx:464
 TRefArray.cxx:465
 TRefArray.cxx:466
 TRefArray.cxx:467
 TRefArray.cxx:468
 TRefArray.cxx:469
 TRefArray.cxx:470
 TRefArray.cxx:471
 TRefArray.cxx:472
 TRefArray.cxx:473
 TRefArray.cxx:474
 TRefArray.cxx:475
 TRefArray.cxx:476
 TRefArray.cxx:477
 TRefArray.cxx:478
 TRefArray.cxx:479
 TRefArray.cxx:480
 TRefArray.cxx:481
 TRefArray.cxx:482
 TRefArray.cxx:483
 TRefArray.cxx:484
 TRefArray.cxx:485
 TRefArray.cxx:486
 TRefArray.cxx:487
 TRefArray.cxx:488
 TRefArray.cxx:489
 TRefArray.cxx:490
 TRefArray.cxx:491
 TRefArray.cxx:492
 TRefArray.cxx:493
 TRefArray.cxx:494
 TRefArray.cxx:495
 TRefArray.cxx:496
 TRefArray.cxx:497
 TRefArray.cxx:498
 TRefArray.cxx:499
 TRefArray.cxx:500
 TRefArray.cxx:501
 TRefArray.cxx:502
 TRefArray.cxx:503
 TRefArray.cxx:504
 TRefArray.cxx:505
 TRefArray.cxx:506
 TRefArray.cxx:507
 TRefArray.cxx:508
 TRefArray.cxx:509
 TRefArray.cxx:510
 TRefArray.cxx:511
 TRefArray.cxx:512
 TRefArray.cxx:513
 TRefArray.cxx:514
 TRefArray.cxx:515
 TRefArray.cxx:516
 TRefArray.cxx:517
 TRefArray.cxx:518
 TRefArray.cxx:519
 TRefArray.cxx:520
 TRefArray.cxx:521
 TRefArray.cxx:522
 TRefArray.cxx:523
 TRefArray.cxx:524
 TRefArray.cxx:525
 TRefArray.cxx:526
 TRefArray.cxx:527
 TRefArray.cxx:528
 TRefArray.cxx:529
 TRefArray.cxx:530
 TRefArray.cxx:531
 TRefArray.cxx:532
 TRefArray.cxx:533
 TRefArray.cxx:534
 TRefArray.cxx:535
 TRefArray.cxx:536
 TRefArray.cxx:537
 TRefArray.cxx:538
 TRefArray.cxx:539
 TRefArray.cxx:540
 TRefArray.cxx:541
 TRefArray.cxx:542
 TRefArray.cxx:543
 TRefArray.cxx:544
 TRefArray.cxx:545
 TRefArray.cxx:546
 TRefArray.cxx:547
 TRefArray.cxx:548
 TRefArray.cxx:549
 TRefArray.cxx:550
 TRefArray.cxx:551
 TRefArray.cxx:552
 TRefArray.cxx:553
 TRefArray.cxx:554
 TRefArray.cxx:555
 TRefArray.cxx:556
 TRefArray.cxx:557
 TRefArray.cxx:558
 TRefArray.cxx:559
 TRefArray.cxx:560
 TRefArray.cxx:561
 TRefArray.cxx:562
 TRefArray.cxx:563
 TRefArray.cxx:564
 TRefArray.cxx:565
 TRefArray.cxx:566
 TRefArray.cxx:567
 TRefArray.cxx:568
 TRefArray.cxx:569
 TRefArray.cxx:570
 TRefArray.cxx:571
 TRefArray.cxx:572
 TRefArray.cxx:573
 TRefArray.cxx:574
 TRefArray.cxx:575
 TRefArray.cxx:576
 TRefArray.cxx:577
 TRefArray.cxx:578
 TRefArray.cxx:579
 TRefArray.cxx:580
 TRefArray.cxx:581
 TRefArray.cxx:582
 TRefArray.cxx:583
 TRefArray.cxx:584
 TRefArray.cxx:585
 TRefArray.cxx:586
 TRefArray.cxx:587
 TRefArray.cxx:588
 TRefArray.cxx:589
 TRefArray.cxx:590
 TRefArray.cxx:591
 TRefArray.cxx:592
 TRefArray.cxx:593
 TRefArray.cxx:594
 TRefArray.cxx:595
 TRefArray.cxx:596
 TRefArray.cxx:597
 TRefArray.cxx:598
 TRefArray.cxx:599
 TRefArray.cxx:600
 TRefArray.cxx:601
 TRefArray.cxx:602
 TRefArray.cxx:603
 TRefArray.cxx:604
 TRefArray.cxx:605
 TRefArray.cxx:606
 TRefArray.cxx:607
 TRefArray.cxx:608
 TRefArray.cxx:609
 TRefArray.cxx:610
 TRefArray.cxx:611
 TRefArray.cxx:612
 TRefArray.cxx:613
 TRefArray.cxx:614
 TRefArray.cxx:615
 TRefArray.cxx:616
 TRefArray.cxx:617
 TRefArray.cxx:618
 TRefArray.cxx:619
 TRefArray.cxx:620
 TRefArray.cxx:621
 TRefArray.cxx:622
 TRefArray.cxx:623
 TRefArray.cxx:624
 TRefArray.cxx:625
 TRefArray.cxx:626
 TRefArray.cxx:627
 TRefArray.cxx:628
 TRefArray.cxx:629
 TRefArray.cxx:630
 TRefArray.cxx:631
 TRefArray.cxx:632
 TRefArray.cxx:633
 TRefArray.cxx:634
 TRefArray.cxx:635
 TRefArray.cxx:636
 TRefArray.cxx:637
 TRefArray.cxx:638
 TRefArray.cxx:639
 TRefArray.cxx:640
 TRefArray.cxx:641
 TRefArray.cxx:642
 TRefArray.cxx:643
 TRefArray.cxx:644
 TRefArray.cxx:645
 TRefArray.cxx:646
 TRefArray.cxx:647
 TRefArray.cxx:648
 TRefArray.cxx:649
 TRefArray.cxx:650
 TRefArray.cxx:651
 TRefArray.cxx:652
 TRefArray.cxx:653
 TRefArray.cxx:654
 TRefArray.cxx:655
 TRefArray.cxx:656
 TRefArray.cxx:657
 TRefArray.cxx:658
 TRefArray.cxx:659
 TRefArray.cxx:660
 TRefArray.cxx:661
 TRefArray.cxx:662
 TRefArray.cxx:663
 TRefArray.cxx:664
 TRefArray.cxx:665
 TRefArray.cxx:666
 TRefArray.cxx:667
 TRefArray.cxx:668
 TRefArray.cxx:669
 TRefArray.cxx:670
 TRefArray.cxx:671
 TRefArray.cxx:672
 TRefArray.cxx:673
 TRefArray.cxx:674
 TRefArray.cxx:675
 TRefArray.cxx:676
 TRefArray.cxx:677
 TRefArray.cxx:678
 TRefArray.cxx:679
 TRefArray.cxx:680
 TRefArray.cxx:681
 TRefArray.cxx:682
 TRefArray.cxx:683
 TRefArray.cxx:684
 TRefArray.cxx:685
 TRefArray.cxx:686
 TRefArray.cxx:687
 TRefArray.cxx:688
 TRefArray.cxx:689
 TRefArray.cxx:690
 TRefArray.cxx:691
 TRefArray.cxx:692
 TRefArray.cxx:693
 TRefArray.cxx:694
 TRefArray.cxx:695
 TRefArray.cxx:696
 TRefArray.cxx:697
 TRefArray.cxx:698
 TRefArray.cxx:699
 TRefArray.cxx:700
 TRefArray.cxx:701
 TRefArray.cxx:702
 TRefArray.cxx:703
 TRefArray.cxx:704
 TRefArray.cxx:705
 TRefArray.cxx:706
 TRefArray.cxx:707
 TRefArray.cxx:708
 TRefArray.cxx:709
 TRefArray.cxx:710
 TRefArray.cxx:711
 TRefArray.cxx:712
 TRefArray.cxx:713
 TRefArray.cxx:714
 TRefArray.cxx:715
 TRefArray.cxx:716
 TRefArray.cxx:717
 TRefArray.cxx:718
 TRefArray.cxx:719
 TRefArray.cxx:720
 TRefArray.cxx:721
 TRefArray.cxx:722
 TRefArray.cxx:723
 TRefArray.cxx:724
 TRefArray.cxx:725
 TRefArray.cxx:726
 TRefArray.cxx:727
 TRefArray.cxx:728
 TRefArray.cxx:729
 TRefArray.cxx:730
 TRefArray.cxx:731
 TRefArray.cxx:732
 TRefArray.cxx:733
 TRefArray.cxx:734
 TRefArray.cxx:735
 TRefArray.cxx:736
 TRefArray.cxx:737
 TRefArray.cxx:738
 TRefArray.cxx:739
 TRefArray.cxx:740
 TRefArray.cxx:741
 TRefArray.cxx:742
 TRefArray.cxx:743
 TRefArray.cxx:744
 TRefArray.cxx:745
 TRefArray.cxx:746
 TRefArray.cxx:747
 TRefArray.cxx:748
 TRefArray.cxx:749
 TRefArray.cxx:750
 TRefArray.cxx:751
 TRefArray.cxx:752
 TRefArray.cxx:753
 TRefArray.cxx:754
 TRefArray.cxx:755
 TRefArray.cxx:756
 TRefArray.cxx:757
 TRefArray.cxx:758
 TRefArray.cxx:759
 TRefArray.cxx:760
 TRefArray.cxx:761
 TRefArray.cxx:762
 TRefArray.cxx:763
 TRefArray.cxx:764
 TRefArray.cxx:765
 TRefArray.cxx:766
 TRefArray.cxx:767
 TRefArray.cxx:768
 TRefArray.cxx:769
 TRefArray.cxx:770
 TRefArray.cxx:771
 TRefArray.cxx:772
 TRefArray.cxx:773
 TRefArray.cxx:774
 TRefArray.cxx:775
 TRefArray.cxx:776
 TRefArray.cxx:777
 TRefArray.cxx:778
 TRefArray.cxx:779
 TRefArray.cxx:780
 TRefArray.cxx:781
 TRefArray.cxx:782
 TRefArray.cxx:783
 TRefArray.cxx:784
 TRefArray.cxx:785
 TRefArray.cxx:786
 TRefArray.cxx:787
 TRefArray.cxx:788
 TRefArray.cxx:789
 TRefArray.cxx:790
 TRefArray.cxx:791
 TRefArray.cxx:792
 TRefArray.cxx:793
 TRefArray.cxx:794
 TRefArray.cxx:795
 TRefArray.cxx:796
 TRefArray.cxx:797
 TRefArray.cxx:798
 TRefArray.cxx:799
 TRefArray.cxx:800
 TRefArray.cxx:801
 TRefArray.cxx:802
 TRefArray.cxx:803
 TRefArray.cxx:804
 TRefArray.cxx:805
 TRefArray.cxx:806
 TRefArray.cxx:807
 TRefArray.cxx:808
 TRefArray.cxx:809
 TRefArray.cxx:810
 TRefArray.cxx:811
 TRefArray.cxx:812
 TRefArray.cxx:813
 TRefArray.cxx:814
 TRefArray.cxx:815
 TRefArray.cxx:816
 TRefArray.cxx:817
 TRefArray.cxx:818
 TRefArray.cxx:819
 TRefArray.cxx:820
 TRefArray.cxx:821
 TRefArray.cxx:822
 TRefArray.cxx:823
 TRefArray.cxx:824
 TRefArray.cxx:825
 TRefArray.cxx:826
 TRefArray.cxx:827
 TRefArray.cxx:828
 TRefArray.cxx:829
 TRefArray.cxx:830
 TRefArray.cxx:831
 TRefArray.cxx:832
 TRefArray.cxx:833
 TRefArray.cxx:834
 TRefArray.cxx:835
 TRefArray.cxx:836
 TRefArray.cxx:837
 TRefArray.cxx:838
 TRefArray.cxx:839
 TRefArray.cxx:840
 TRefArray.cxx:841
 TRefArray.cxx:842
 TRefArray.cxx:843
 TRefArray.cxx:844
 TRefArray.cxx:845
 TRefArray.cxx:846
 TRefArray.cxx:847
 TRefArray.cxx:848
 TRefArray.cxx:849
 TRefArray.cxx:850
 TRefArray.cxx:851
 TRefArray.cxx:852
 TRefArray.cxx:853
 TRefArray.cxx:854
 TRefArray.cxx:855
 TRefArray.cxx:856
 TRefArray.cxx:857
 TRefArray.cxx:858
 TRefArray.cxx:859
 TRefArray.cxx:860
 TRefArray.cxx:861
 TRefArray.cxx:862
 TRefArray.cxx:863
 TRefArray.cxx:864
 TRefArray.cxx:865
 TRefArray.cxx:866
 TRefArray.cxx:867
 TRefArray.cxx:868
 TRefArray.cxx:869
 TRefArray.cxx:870
 TRefArray.cxx:871
 TRefArray.cxx:872
 TRefArray.cxx:873
 TRefArray.cxx:874
 TRefArray.cxx:875
 TRefArray.cxx:876
 TRefArray.cxx:877
 TRefArray.cxx:878
 TRefArray.cxx:879
 TRefArray.cxx:880
 TRefArray.cxx:881
 TRefArray.cxx:882
 TRefArray.cxx:883
 TRefArray.cxx:884
 TRefArray.cxx:885
 TRefArray.cxx:886
 TRefArray.cxx:887
 TRefArray.cxx:888
 TRefArray.cxx:889
 TRefArray.cxx:890
 TRefArray.cxx:891
 TRefArray.cxx:892
 TRefArray.cxx:893
 TRefArray.cxx:894
 TRefArray.cxx:895
 TRefArray.cxx:896
 TRefArray.cxx:897
 TRefArray.cxx:898
 TRefArray.cxx:899
 TRefArray.cxx:900
 TRefArray.cxx:901
 TRefArray.cxx:902
 TRefArray.cxx:903
 TRefArray.cxx:904
 TRefArray.cxx:905
 TRefArray.cxx:906
 TRefArray.cxx:907