37 template<
class BaseType,
class CoType>
40 Pool<BaseType, CoType> *pool,
41 BaseType *convar) : master_(master), conVar_(convar), pool_(pool)
43 version_ = (convar) ? 1 : 0;
47 template<
class BaseType,
class CoType>
48 PoolSlot<BaseType, CoType>::~PoolSlot()
51 if (conVar_ && conVar_->nReferences()) {
52 Logger::ifout() <<
"~PoolSlot(): it is not allowed to destruct objects of class PoolSlot with a constraint/variable with positive reference counter = " << conVar_->nReferences() <<
".\n";
55 #ifndef OGDF_USE_ASSERT_EXCEPTIONS // do not throw exceptions in destructor
56 OGDF_ASSERT((conVar_ && conVar_->nReferences()) ==
false);
64 template<
class BaseType,
class CoType>
65 void PoolSlot<BaseType, CoType>::insert(BaseType *convar)
67 if (conVar_ !=
nullptr) {
68 Logger::ifout() <<
"PoolSlot::insert(): insertion failed, the slot is not void\n";
72 if (version_ == std::numeric_limits<unsigned long>::max()) {
73 Logger::ifout() <<
"PoolSlot::insert(): insertion failed, maximum version number ULONG_MAX reached\n";