Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

poolslotref.inc
Go to the documentation of this file.
1 
29 #pragma once
30 
32 
33 #pragma GCC visibility push(default)
34 namespace abacus {
35 
36 
37 template <class BaseType, class CoType>
38 std::ostream &operator<<(std::ostream &out, const PoolSlotRef<BaseType, CoType> &slot)
39 {
40  if (slot.conVar())
41  slot.conVar()->print(out);
42  return out;
43 }
44 
45 
46 template<class BaseType, class CoType>
48 {
49  Logger::ilout(Logger::Level::Minor) << "PoolSlotRef::con: Version of reference to slot " << version_
50  << " and version of slot " << slot_->version() << " differ." << std::endl;
51 }
52 
53 
54 template<class BaseType, class CoType>
55 void PoolSlotRef<BaseType, CoType>::slot(PoolSlot<BaseType, CoType> *s)
56 {
57  ConVar *cv;
58 
59  if(slot_) {
60  cv = slot_->conVar();
61  if (cv && version_ == slot_->version())
62  cv->removeReference();
63  }
64 
65  slot_ = s;
66  version_ = s->version();
67  cv = slot_->conVar();
68  if(cv) cv->addReference();
69 }
70 
71 }
72 #pragma GCC visibility pop
ogdf::Logger::Level::Minor
@ Minor
abacus::operator<<
std::ostream & operator<<(std::ostream &out, const Active< BaseType, CoType > &rhs)
abacus
Definition: ILPClusterPlanarity.h:50
poolslotref.h
poolslotref
ogdf::Logger::ilout
static std::ostream & ilout(Level level=Level::Default)
Definition: Logger.h:213
abacus::PoolSlotRef::printDifferentVersionError
void printDifferentVersionError() const
abacus::PoolSlotRef::slot
PoolSlot< BaseType, CoType > * slot() const
Returns a pointer to the referenced slot.
Definition: poolslotref.h:140