ABA_POOLSLOT< BaseType, CoType > Class Template Reference

Constraints or variables are not directly stored in a pool. But are stored in a pool slot. More...

#include <poolslot.h>

Inheritance diagram for ABA_POOLSLOT< BaseType, CoType >:

ABA_ABACUSROOT List of all members.

Public Member Functions

 ABA_POOLSLOT (ABA_MASTER *master, ABA_POOL< BaseType, CoType > *pool, BaseType *convar=0)
 The constructor sets the version number to 1, if already a constraint is inserted in this slot, otherwise it is set to 0.
 ~ABA_POOLSLOT ()
 The destructor for the poolslot must not be called if there are references to its constraint/variable.
BaseType * conVar () const

Private Member Functions

void insert (BaseType *convar)
int softDelete ()
void hardDelete ()
void removeConVarFromPool ()
unsigned long version () const
ABA_MASTERmaster ()
 ABA_POOLSLOT (const ABA_POOLSLOT< BaseType, CoType > &rhs)
const ABA_POOLSLOT< BaseType,
CoType > & 
operator= (const ABA_POOLSLOT< BaseType, CoType > &rhs)

Private Attributes

ABA_MASTERmaster_
BaseType * conVar_
unsigned long version_
ABA_POOL< BaseType, CoType > * pool_

Friends

class ABA_POOLSLOTREF< BaseType, CoType >
class ABA_POOL< BaseType, CoType >
class ABA_STANDARDPOOL< BaseType, CoType >
class ABA_CUTBUFFER< BaseType, CoType >
class ABA_SUB
class ABA_POOLSLOTREF< ABA_CONSTRAINT, ABA_VARIABLE >
class ABA_POOLSLOTREF< ABA_VARIABLE, ABA_CONSTRAINT >
class ABA_POOL< ABA_CONSTRAINT, ABA_VARIABLE >
class ABA_POOL< ABA_VARIABLE, ABA_CONSTRAINT >
class ABA_STANDARDPOOL< ABA_CONSTRAINT, ABA_VARIABLE >
class ABA_STANDARDPOOL< ABA_VARIABLE, ABA_CONSTRAINT >
class ABA_NONDUPLPOOL< ABA_CONSTRAINT, ABA_VARIABLE >
class ABA_NONDUPLPOOL< ABA_VARIABLE, ABA_CONSTRAINT >
class ABA_CUTBUFFER< ABA_CONSTRAINT, ABA_VARIABLE >
class ABA_CUTBUFFER< ABA_VARIABLE, ABA_CONSTRAINT >

Detailed Description

template<class BaseType, class CoType>
class ABA_POOLSLOT< BaseType, CoType >

Constraints or variables are not directly stored in a pool. But are stored in a pool slot.

Definition at line 76 of file poolslot.h.


Constructor & Destructor Documentation

template<class BaseType, class CoType>
ABA_POOLSLOT< BaseType, CoType >::ABA_POOLSLOT ( ABA_MASTER master,
ABA_POOL< BaseType, CoType > *  pool,
BaseType *  convar = 0 
)

The constructor sets the version number to 1, if already a constraint is inserted in this slot, otherwise it is set to 0.

Parameters:
master A pointer to the corresponding master of the optimization.
pool The pool this slot belongs to.
conVar The constraint/variable inserted in this slot if not 0. The default value is 0.

template<class BaseType, class CoType>
ABA_POOLSLOT< BaseType, CoType >::~ABA_POOLSLOT (  ) 

The destructor for the poolslot must not be called if there are references to its constraint/variable.

template<class BaseType, class CoType>
ABA_POOLSLOT< BaseType, CoType >::ABA_POOLSLOT ( const ABA_POOLSLOT< BaseType, CoType > &  rhs  )  [private]


Member Function Documentation

template<class BaseType, class CoType>
BaseType* ABA_POOLSLOT< BaseType, CoType >::conVar (  )  const

Returns:
A pointer to the constraint/variable in the pool slot.

template<class BaseType, class CoType>
void ABA_POOLSLOT< BaseType, CoType >::insert ( BaseType *  convar  )  [private]

Inserts a constraint/variable in the slot, and updates the version number.

If the slot still contains a constraint, the program stops.

The constant ULONG_MAX is defined in the file { limits.h}.

Parameters:
conVar The constraint/variable that is inserted.

template<class BaseType, class CoType>
int ABA_POOLSLOT< BaseType, CoType >::softDelete (  )  [private]

Tries to remove the item from the slot.

This is possible if the function ABA_CONVAR::deletable() returns true.

Returns:
0 If the constraint/variable in the slot could be deleted,

1 otherwise.

template<class BaseType, class CoType>
void ABA_POOLSLOT< BaseType, CoType >::hardDelete (  )  [private]

Deletes the constraint/variable in the slot.

Warning:
This function should be used very carefully.

template<class BaseType, class CoType>
void ABA_POOLSLOT< BaseType, CoType >::removeConVarFromPool (  )  [private]

Removes the constraint contained in this ABA_POOLSLOT from its own ABA_POOL.

template<class BaseType, class CoType>
unsigned long ABA_POOLSLOT< BaseType, CoType >::version (  )  const [private]

Returns:
The version number of the constraint/variable of the slot.

template<class BaseType, class CoType>
ABA_MASTER* ABA_POOLSLOT< BaseType, CoType >::master (  )  [private]

Returns:
A pointer to the corresponding master of the optimization.

template<class BaseType, class CoType>
const ABA_POOLSLOT<BaseType, CoType>& ABA_POOLSLOT< BaseType, CoType >::operator= ( const ABA_POOLSLOT< BaseType, CoType > &  rhs  )  [private]


Friends And Related Function Documentation

template<class BaseType, class CoType>
friend class ABA_POOLSLOTREF< BaseType, CoType > [friend]

Definition at line 77 of file poolslot.h.

template<class BaseType, class CoType>
friend class ABA_POOL< BaseType, CoType > [friend]

Definition at line 78 of file poolslot.h.

template<class BaseType, class CoType>
friend class ABA_STANDARDPOOL< BaseType, CoType > [friend]

Definition at line 79 of file poolslot.h.

template<class BaseType, class CoType>
friend class ABA_CUTBUFFER< BaseType, CoType > [friend]

Definition at line 80 of file poolslot.h.

template<class BaseType, class CoType>
friend class ABA_SUB [friend]

Definition at line 82 of file poolslot.h.

template<class BaseType, class CoType>
friend class ABA_POOLSLOTREF< ABA_CONSTRAINT, ABA_VARIABLE > [friend]

Definition at line 83 of file poolslot.h.

template<class BaseType, class CoType>
friend class ABA_POOLSLOTREF< ABA_VARIABLE, ABA_CONSTRAINT > [friend]

Definition at line 84 of file poolslot.h.

template<class BaseType, class CoType>
friend class ABA_POOL< ABA_CONSTRAINT, ABA_VARIABLE > [friend]

Definition at line 85 of file poolslot.h.

template<class BaseType, class CoType>
friend class ABA_POOL< ABA_VARIABLE, ABA_CONSTRAINT > [friend]

Definition at line 86 of file poolslot.h.

template<class BaseType, class CoType>
friend class ABA_STANDARDPOOL< ABA_CONSTRAINT, ABA_VARIABLE > [friend]

Definition at line 87 of file poolslot.h.

template<class BaseType, class CoType>
friend class ABA_STANDARDPOOL< ABA_VARIABLE, ABA_CONSTRAINT > [friend]

Definition at line 88 of file poolslot.h.

template<class BaseType, class CoType>
friend class ABA_NONDUPLPOOL< ABA_CONSTRAINT, ABA_VARIABLE > [friend]

Definition at line 89 of file poolslot.h.

template<class BaseType, class CoType>
friend class ABA_NONDUPLPOOL< ABA_VARIABLE, ABA_CONSTRAINT > [friend]

Definition at line 90 of file poolslot.h.

template<class BaseType, class CoType>
friend class ABA_CUTBUFFER< ABA_CONSTRAINT, ABA_VARIABLE > [friend]

Definition at line 91 of file poolslot.h.

template<class BaseType, class CoType>
friend class ABA_CUTBUFFER< ABA_VARIABLE, ABA_CONSTRAINT > [friend]

Definition at line 92 of file poolslot.h.


Member Data Documentation

template<class BaseType, class CoType>
ABA_MASTER* ABA_POOLSLOT< BaseType, CoType >::master_ [private]

A pointer to the corresponding master of the optimization.

Definition at line 182 of file poolslot.h.

template<class BaseType, class CoType>
BaseType* ABA_POOLSLOT< BaseType, CoType >::conVar_ [private]

A pointer to the constraint/variable.

Definition at line 186 of file poolslot.h.

template<class BaseType, class CoType>
unsigned long ABA_POOLSLOT< BaseType, CoType >::version_ [private]

The version of the constraint in the slot.

Definition at line 190 of file poolslot.h.

template<class BaseType, class CoType>
ABA_POOL<BaseType, CoType>* ABA_POOLSLOT< BaseType, CoType >::pool_ [private]

A pointer to the corresponding pool.

Definition at line 194 of file poolslot.h.


The documentation for this class was generated from the following file:
Generated on Tue Aug 14 18:09:58 2007 for ABACUS by  doxygen 1.5.1