39 template<
class BaseType,
class CoType>
42 template<
class BaseType,
class CoType>
43 std::ostream &operator<< (std::ostream &out, const PoolSlotRef<BaseType, CoType> &slot);
53 template<
class BaseType,
class CoType>
54 class PoolSlotRef :
public AbacusRoot {
129 return slot_->conVar();
BaseType * conVar() const
Returns a pointer to the constraint/variable stored in the referenced slot.
The master of the optimization.
Common base class for constraints (Constraint) and variables (Variable).
PoolSlotRef(Master *master)
Creates an object referencing no pool slot.
const PoolSlotRef< BaseType, CoType > & operator=(const PoolSlotRef< BaseType, CoType > &rhs)
void addReference()
Indicates that there is a new reference to the pool slot storing this constraint/variable.
~PoolSlotRef()
The destructor.
the master of the optimization.
PoolSlotRef(const PoolSlotRef< BaseType, CoType > &rhs)
Copy constructor.
PoolSlot< BaseType, CoType > * slot_
A pointer to the referenced pool slot.
#define OGDF_NEW_DELETE
Makes the class use OGDF's memory allocator.
Stores a pointer to a pool slot with version number.
Stores constraints and variables.
unsigned long version_
The version number of the slot at construction/initialization time of this reference.
PoolSlotRef(PoolSlot< BaseType, CoType > *slot)
Creates an object referencing a pool slot slot.
PoolSlot< BaseType, CoType > * slot() const
Returns a pointer to the referenced slot.
void removeReference()
Is the counterpart of the function addReference() and indicates the removal of a reference to this co...
unsigned long version() const
Returns the version number of the constraint/variable stored in the referenced slot at construction t...
void printDifferentVersionError() const
Master * master_
A pointer to the corresponding master of the optimization.