Brancher for calling a function More...
Classes | |
class | Description |
Minimal brancher description storing no information. More... | |
Public Member Functions | |
virtual bool | status (const Space &) const |
Check status of brancher, return true if alternatives left. | |
virtual const Choice * | choice (Space &) |
Return choice. | |
virtual const Choice * | choice (const Space &, Archive &) |
Return choice. | |
virtual ExecStatus | commit (Space &home, const Choice &, unsigned int) |
Perform commit. | |
virtual void | print (const Space &, const Choice &, unsigned int, std::ostream &o) const |
Print explanation. | |
virtual Actor * | copy (Space &home, bool share) |
Copy brancher. | |
Static Public Member Functions | |
static void | post (Home home, void(*f)(Space &)) |
Post brancher. | |
Protected Member Functions | |
FunctionBranch (Home home, void(*f0)(Space &)) | |
Construct brancher. | |
FunctionBranch (Space &home, bool share, FunctionBranch &b) | |
Copy constructor. | |
Protected Attributes | |
void(* | f )(Space &) |
Function to call. | |
bool | done |
Call function just once. |
Brancher for calling a function
Definition at line 45 of file branch.cpp.
Gecode::FunctionBranch::FunctionBranch | ( | Home | home, |
void(*)(Space &) | f0 | ||
) | [inline, protected] |
Construct brancher.
Definition at line 64 of file branch.cpp.
Gecode::FunctionBranch::FunctionBranch | ( | Space & | home, |
bool | share, | ||
FunctionBranch & | b | ||
) | [inline, protected] |
Copy constructor.
Definition at line 67 of file branch.cpp.
virtual bool Gecode::FunctionBranch::status | ( | const Space & | ) | const [inline, virtual] |
Check status of brancher, return true if alternatives left.
Implements Gecode::Brancher.
Definition at line 71 of file branch.cpp.
virtual const Choice* Gecode::FunctionBranch::choice | ( | Space & | ) | [inline, virtual] |
virtual const Choice* Gecode::FunctionBranch::choice | ( | const Space & | , |
Archive & | |||
) | [inline, virtual] |
virtual ExecStatus Gecode::FunctionBranch::commit | ( | Space & | home, |
const Choice & | , | ||
unsigned int | |||
) | [inline, virtual] |
virtual void Gecode::FunctionBranch::print | ( | const Space & | , |
const Choice & | , | ||
unsigned int | , | ||
std::ostream & | o | ||
) | const [inline, virtual] |
virtual Actor* Gecode::FunctionBranch::copy | ( | Space & | home, |
bool | share | ||
) | [inline, virtual] |
static void Gecode::FunctionBranch::post | ( | Home | home, |
void(*)(Space &) | f | ||
) | [inline, static] |
Post brancher.
Definition at line 101 of file branch.cpp.
void(* Gecode::FunctionBranch::f)(Space &) [protected] |
Function to call.
Definition at line 60 of file branch.cpp.
bool Gecode::FunctionBranch::done [protected] |
Call function just once.
Definition at line 62 of file branch.cpp.