// NiTPointerMap.cpp // EMERGENT GAME TECHNOLOGIES PROPRIETARY INFORMATION // // This software is supplied under the terms of a license agreement or // nondisclosure agreement with Emergent Game Technologies and may not // be copied or disclosed except in accordance with the terms of that // agreement. // // Copyright (c) 1996-2007 Emergent Game Technologies. // All Rights Reserved. // // Emergent Game Technologies, Chapel Hill, North Carolina 27517 // http://www.emergent.net //--------------------------------------------------------------------------- template inline NiTPointerMap::~NiTPointerMap() { // RemoveAll is called from here because it depends on virtual functions // implemented in NiTAllocatorMap. It will also be called in the // parent destructor, but the map will already be empty. NiTPointerMap::RemoveAll(); } //--------------------------------------------------------------------------- template inline NiTMapItem* NiTPointerMap::NewItem() { return (NiTMapItem*)NiTMapBase, TKEY, TVAL, THASH, TEQUALS>::m_kAllocator.Allocate(); } //--------------------------------------------------------------------------- template inline void NiTPointerMap:: DeleteItem(NiTMapItem* pkItem) { // set key and val to zero so that if they are smart pointers // their references will be decremented. pkItem->m_val = 0; NiTMapBase, TKEY, TVAL, THASH, TEQUALS>::m_kAllocator.Deallocate(pkItem); } //---------------------------------------------------------------------------