// Copyright (c) 1994 James Clark // See the file COPYING for copying permission. #ifndef OwnerTable_DEF_INCLUDED #define OwnerTable_DEF_INCLUDED 1 #ifdef SP_NAMESPACE namespace SP_NAMESPACE { #endif // The uses of "this->" are for HP's compiler. template OwnerTable::~OwnerTable() { for (size_t i = 0; i < this->vec_.size(); i++) delete this->vec_[i]; } template void OwnerTable::clear() { for (size_t i = 0; i < this->vec_.size(); i++) delete this->vec_[i]; PointerTable::clear(); } template void CopyOwnerTable::operator=(const CopyOwnerTable &t) { this->clear(); PointerTable::operator=(t); // FIXME This isn't exception safe. for (size_t i = 0; i < this->vec_.size(); i++) if (this->vec_[i]) this->vec_[i] = this->vec_[i]->copy(); } #ifdef SP_NAMESPACE } #endif #endif /* not OwnerTable_DEF_INCLUDED */