/*========================================================================== * * Copyright (C) 1995 - 2000 Microsoft Corporation. All Rights Reserved. * * File: BagArray.inl * Content: CBagArray methods * * History: * Date By Reason * ====== == ====== * 12-12-2001 simonpow Created ***************************************************************************/ template BOOL CBagArray::AddElements(const T * pElems, DWORD dwNumElem) { //ensure pointer passed isn't into this bags contents! DNASSERT(!(pElems>=m_data.GetAllElements() && pElems BOOL CBagArray::AddElements(const CBagArray& bag) { //ensure bag supplied isn't this bag DNASSERT(this!=&bag); if (!m_data.AllocAtLeast(m_dwTopFreeSlot+bag.GetNumElements())) return FALSE; for (DWORD dwLoop=0; dwLoop BOOL CBagArray::RemoveElementByValue(const T& elem) { for (DWORD dwLoop=0; dwLoop BOOL CBagArray::FindElement(const T& elem, DWORD * pdwIndex) const { for (DWORD dwLoop=0; dwLoop