/////// File: ArbL_ac.C /////// #include "ArbL_ac.h" // generic list with assignment and copy // a friend class of ArbList // assignment ArbList_ac& ArbList_ac::operator =(const ArbList& x) { if ( &x == this ) return(*this); if ( ! is_empty() ) free(); copy(x); return(*this); } void ArbList_ac::copy(const ArbList& x) { equal = x.equal; // copy data members dispfn = x.dispfn; ArbCell* lx = x.first(); head = NULL; // empty list ArbCell* p = head; while ( ! is_end(lx) ) // copy list { insert(ArbList::content(lx), p); p = ArbList::next(p); lx = ArbList::next(lx); } }