11 inline IDeleteNotice() { }
12 virtual inline ~IDeleteNotice() { assert(next_ ==
nullptr); assert(prev_ ==
nullptr); }
13 virtual void onDelete(
IThing *pnt)=0;
14 virtual void changeToNewPointer(
IThing *oldPnt,
IThing *newPnt)=0;
15 inline void insert(IDeleteNotice **head);
16 inline void remove(IDeleteNotice **head);
17 inline bool isInserted()
const {
return next_ ? true :
false; }
18 inline IDeleteNotice *nextDeleteNotice() {
return next_; }
20 IDeleteNotice(
const IDeleteNotice &) =
delete;
21 IDeleteNotice(IDeleteNotice &&) =
delete;
22 void operator=(
const IDeleteNotice &) =
delete;
23 IDeleteNotice *next_ =
nullptr;
24 IDeleteNotice *prev_ =
nullptr;
28 assert(prev_==
nullptr);
29 assert(next_==
nullptr);
32 if (*head) (*head)->prev_ =
this;
36 inline void IDeleteNotice::remove(IDeleteNotice **head) {
38 if (prev_) prev_->next_ = next_;
39 else if (*head==
this) *head = next_;
40 if (next_) next_->prev_ = prev_;
41 next_ = prev_ =
nullptr;
Definition ideletenotice.h:9
Base class for items that will be stored in containers.
Definition ithing.h:31
namespace Itasca
Definition basememory.cpp:14