35 #pragma GCC visibility push(default)
38 template<
class BaseType,
class CoType>
41 Pool<BaseType, CoType> *pool,
42 BaseType *convar) : master_(master), conVar_(convar), pool_(pool)
44 version_ = (convar) ? 1 : 0;
48 template<
class BaseType,
class CoType>
49 PoolSlot<BaseType, CoType>::~PoolSlot()
52 if (conVar_ && conVar_->nReferences()) {
53 Logger::ifout() <<
"~PoolSlot(): it is not allowed to destruct objects of class PoolSlot with a constraint/variable with positive reference counter = " << conVar_->nReferences() <<
".\n";
56 #ifndef OGDF_USE_ASSERT_EXCEPTIONS // do not throw exceptions in destructor
57 OGDF_ASSERT((conVar_ && conVar_->nReferences()) ==
false);
65 template<
class BaseType,
class CoType>
66 void PoolSlot<BaseType, CoType>::insert(BaseType *convar)
68 if (conVar_ !=
nullptr) {
69 Logger::ifout() <<
"PoolSlot::insert(): insertion failed, the slot is not void\n";
73 if (version_ == std::numeric_limits<unsigned long>::max()) {
74 Logger::ifout() <<
"PoolSlot::insert(): insertion failed, maximum version number ULONG_MAX reached\n";
83 #pragma GCC visibility pop