Gecode::TraceRecorder Class Reference
Functionality by programming task » Programming models » Tracing constraint propagation

Propagator for recording trace information. More...

`#include <recorder.hpp>`

## Public Member Functions

| TraceRecorder (Space &home, TraceRecorder &p)
| Constructor for cloning p.
| TraceRecorder (Home home, TraceFilter tf, int te, Tracer &t)
| Constructor for creation.
virtual Propagator * | copy (Space &home)
| Copy propagator during cloning.
virtual PropCost | cost (const Space &home, const ModEventDelta &med) const
| Cost function (record so that propagator runs last).
virtual void | reschedule (Space &home)
| Schedule function.
virtual ExecStatus | propagate (Space &home, const ModEventDelta &med)
| Perform propagation.
virtual size_t | dispose (Space &home)
| Delete propagator and return its size.
ModEventDelta | modeventdelta (void) const
| Return the modification event delta.
virtual ExecStatus | advise (Space &home, Advisor &a, const Delta &d)
| Advise function.
virtual void | advise (Space &home, Advisor &a)
| Run advisor a to be run on failure in failed space.
double | afc (void) const
| Return the accumlated failure count.
unsigned int | id (void) const
| Return propagator id.
PropagatorGroup | group (void) const
| Return group propagator belongs to.
void | group (PropagatorGroup g)
| Add propagator to group g.
bool | disabled (void) const
| Whether propagator is currently disabled.
virtual | ~Actor (void)
| To avoid warnings.

## Static Public Member Functions

static ExecStatus | post (Home home, TraceFilter tf, int te, Tracer &t)
| Post propagator.
static void * | operator new (size_t s, Space &home)
| Allocate memory from space.
static void | operator delete (void *p, Space &home)
| No-op for exceptions.
static void * | operator new (size_t s)
| Not used.
static void | operator delete (void *p)
| Not used.

## Public Attributes

TraceFilter | tf
| The trace filter.
int | te
| Which events to trace.
Tracer & | t
| The actual tracer.

## Trace information

const TraceFilter & | filter (void) const
| Return trace filter.
int | events (void) const
| Which events to trace.
Tracer & | tracer (void) const
| Return tracer.

## Additional Inherited Members

Protected Member Functions inherited from Gecode::Propagator
| Propagator (Home home)
| Constructor for posting.
| Propagator (Space &home, Propagator &p)
| Constructor for cloning p.
Propagator * | fwd (void) const
| Return forwarding pointer during copying.
Kernel::GPI::Info & | gpi (void)
| Provide access to global propagator information.

## Detailed Description

Propagator for recording trace information.

This propagator is actually never run. It only provides access to information needed for tracing.

Definition at line 154 of file recorder.hpp.

## Constructor & Destructor Documentation

## TraceRecorder() [1/2]

Gecode::TraceRecorder::TraceRecorder | ( | Space & | home,
|  | TraceRecorder & | p )

inline

Constructor for cloning p.

Definition at line 416 of file recorder.hpp.

## TraceRecorder() [2/2]

Gecode::TraceRecorder::TraceRecorder | ( | Home | home,
|  | TraceFilter | tf,
|  | int | te,
|  | Tracer & | t )

inline

Constructor for creation.

Definition at line 401 of file recorder.hpp.

## Member Function Documentation

## copy()

Propagator * Gecode::TraceRecorder::copy | ( | Space & | home | ) |

virtual

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 39 of file recorder.cpp.

## cost()

PropCost Gecode::TraceRecorder::cost | ( | const Space & | home,
|  | const ModEventDelta & | med ) const

virtual

Cost function (record so that propagator runs last).

Implements Gecode::Propagator.

Definition at line 53 of file recorder.cpp.

## reschedule()

void Gecode::TraceRecorder::reschedule | ( | Space & | home | ) |

virtual

Schedule function.

Implements Gecode::Propagator.

Definition at line 58 of file recorder.cpp.

## propagate()

ExecStatus Gecode::TraceRecorder::propagate | ( | Space & | home,
|  | const ModEventDelta & | med )

virtual

Perform propagation.

Implements Gecode::Propagator.

Definition at line 62 of file recorder.cpp.

## dispose()

size_t Gecode::TraceRecorder::dispose | ( | Space & | home | ) |

virtual

Delete propagator and return its size.

Reimplemented from Gecode::Actor.

Definition at line 44 of file recorder.cpp.

## post()

ExecStatus Gecode::TraceRecorder::post | ( | Home | home,
|  | TraceFilter | tf,
|  | int | te,
|  | Tracer & | t )

inline static

Post propagator.

Definition at line 409 of file recorder.hpp.

## filter()

const TraceFilter & Gecode::TraceRecorder::filter | ( | void |  | ) | const

inline

Return trace filter.

Definition at line 383 of file recorder.hpp.

## events()

int Gecode::TraceRecorder::events | ( | void |  | ) | const

inline

Which events to trace.

Definition at line 387 of file recorder.hpp.

## tracer()

Tracer & Gecode::TraceRecorder::tracer | ( | void |  | ) | const

inline

Return tracer.

Definition at line 391 of file recorder.hpp.

## Member Data Documentation

## tf

TraceFilter Gecode::TraceRecorder::tf

The trace filter.

Definition at line 157 of file recorder.hpp.

## te

int Gecode::TraceRecorder::te

Which events to trace.

Definition at line 159 of file recorder.hpp.

## t

Tracer& Gecode::TraceRecorder::t

The actual tracer.

Definition at line 161 of file recorder.hpp.

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

- gecode/kernel/trace/recorder.hpp
- gecode/kernel/trace/recorder.cpp