Generated on Mon Jul 6 18:09:30 2009 for Gecode by doxygen 1.5.9

Gecode::VarViewBase< VarImp > Class Template Reference
[Programming views for variables]

Base-class for variable views. More...

#include <view.hpp>

List of all members.

Protected Member Functions

 VarViewBase (void)
 Default constructor.
 VarViewBase (VarImp *x)
 Initialize with variable implementation x.

Protected Attributes

VarImpvarimp
 Pointer to variable implementation.

Generic view information

static bool varderived (void)
 Return whether this view is derived from a VarViewBase.
VarImpvar (void) const
 Return variable implementation of view.
unsigned int degree (void) const
 Return degree (number of subscribed propagators and advisors).

View-dependent propagator support

static void schedule (Space &home, Propagator &p, ModEvent me)
 Schedule propagator p with modification event me.
static ModEvent me (const ModEventDelta &med)
 Return modification event for view type in med.
static ModEventDelta med (ModEvent me)
 Translate modification event me to modification event delta for view.
static ModEvent me_combine (ModEvent me1, ModEvent me2)
 Combine modifications events me1 and me2.

Dependencies

void subscribe (Space &home, Propagator &p, PropCond pc, bool process=true)
 Subscribe propagator p with propagation condition pc to view.
void cancel (Space &home, Propagator &p, PropCond pc)
 Cancel subscription of propagator p with propagation condition pc to view.
void subscribe (Space &home, Advisor &a)
 Subscribe advisor a to view.
void cancel (Space &home, Advisor &a)
 Cancel subscription of advisor a.

View comparison

template<class VarImp >
bool same (const VarViewBase< VarImp > &x, const VarViewBase< VarImp > &y)
 Test whether views x and y are the same.
template<class VarImp >
bool before (const VarViewBase< VarImp > &x, const VarViewBase< VarImp > &y)
 Test whether view x comes before y (arbitrary order).


Detailed Description

template<class VarImp>
class Gecode::VarViewBase< VarImp >

Base-class for variable views.

Definition at line 64 of file view.hpp.


Constructor & Destructor Documentation

template<class VarImp >
Gecode::VarViewBase< VarImp >::VarViewBase ( void   )  [inline, protected]

Default constructor.

Definition at line 237 of file view.hpp.

template<class VarImp>
Gecode::VarViewBase< VarImp >::VarViewBase ( VarImp x  )  [inline, protected]

Initialize with variable implementation x.

Definition at line 241 of file view.hpp.


Member Function Documentation

template<class VarImp >
bool Gecode::VarViewBase< VarImp >::varderived ( void   )  [inline, static]

Return whether this view is derived from a VarViewBase.

Definition at line 245 of file view.hpp.

template<class VarImp >
VarImp * Gecode::VarViewBase< VarImp >::var ( void   )  const [inline]

Return variable implementation of view.

Definition at line 250 of file view.hpp.

template<class VarImp >
unsigned int Gecode::VarViewBase< VarImp >::degree ( void   )  const [inline]

Return degree (number of subscribed propagators and advisors).

Definition at line 255 of file view.hpp.

template<class VarImp >
void Gecode::VarViewBase< VarImp >::schedule ( Space home,
Propagator p,
ModEvent  me 
) [inline, static]

Schedule propagator p with modification event me.

Definition at line 281 of file view.hpp.

template<class VarImp >
ModEvent Gecode::VarViewBase< VarImp >::me ( const ModEventDelta med  )  [inline, static]

Return modification event for view type in med.

Definition at line 286 of file view.hpp.

template<class VarImp >
ModEventDelta Gecode::VarViewBase< VarImp >::med ( ModEvent  me  )  [inline, static]

Translate modification event me to modification event delta for view.

Reimplemented in Gecode::Int::IntView, and Gecode::Int::BoolView.

Definition at line 291 of file view.hpp.

template<class VarImp >
ModEvent Gecode::VarViewBase< VarImp >::me_combine ( ModEvent  me1,
ModEvent  me2 
) [inline, static]

Combine modifications events me1 and me2.

Definition at line 296 of file view.hpp.

template<class VarImp >
void Gecode::VarViewBase< VarImp >::subscribe ( Space home,
Propagator p,
PropCond  pc,
bool  process = true 
) [inline]

Subscribe propagator p with propagation condition pc to view.

In case process is false, the propagator is just subscribed but not processed for execution (this must be used when creating subscriptions during propagation).

Definition at line 260 of file view.hpp.

template<class VarImp >
void Gecode::VarViewBase< VarImp >::cancel ( Space home,
Propagator p,
PropCond  pc 
) [inline]

Cancel subscription of propagator p with propagation condition pc to view.

Definition at line 266 of file view.hpp.

template<class VarImp >
void Gecode::VarViewBase< VarImp >::subscribe ( Space home,
Advisor a 
) [inline]

Subscribe advisor a to view.

Definition at line 271 of file view.hpp.

template<class VarImp >
void Gecode::VarViewBase< VarImp >::cancel ( Space home,
Advisor a 
) [inline]

Cancel subscription of advisor a.

Definition at line 276 of file view.hpp.


Friends And Related Function Documentation

template<class VarImp >
bool same ( const VarViewBase< VarImp > &  x,
const VarViewBase< VarImp > &  y 
) [related]

Test whether views x and y are the same.

Definition at line 302 of file view.hpp.

template<class VarImp >
bool before ( const VarViewBase< VarImp > &  x,
const VarViewBase< VarImp > &  y 
) [related]

Test whether view x comes before y (arbitrary order).

Definition at line 307 of file view.hpp.


Member Data Documentation

template<class VarImp>
VarImp* Gecode::VarViewBase< VarImp >::varimp [protected]

Pointer to variable implementation.

Definition at line 67 of file view.hpp.


The documentation for this class was generated from the following file: