Generated on Thu Mar 16 2017 03:24:28 for Gecode by doxygen 1.8.13
Gecode::FunctionBranch Class Reference

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. More...
 
virtual const Choicechoice (Space &)
 Return choice. More...
 
virtual const Choicechoice (const Space &, Archive &)
 Return choice. More...
 
virtual ExecStatus commit (Space &home, const Choice &, unsigned int)
 Perform commit. More...
 
virtual void print (const Space &, const Choice &, unsigned int, std::ostream &o) const
 Print explanation. More...
 
virtual Actorcopy (Space &home, bool share)
 Copy brancher. More...
 
- Public Member Functions inherited from Gecode::Brancher
virtual NGLngl (Space &home, const Choice &c, unsigned int a) const
 Create no-good literal for choice c and alternative a. More...
 
unsigned int id (void) const
 Return brancher id. More...
 
BrancherGroup group (void) const
 Return group brancher belongs to. More...
 
void group (BrancherGroup g)
 Add brancher to group g. More...
 
void kill (Space &home)
 Kill brancher. More...
 
- Public Member Functions inherited from Gecode::Actor
virtual ~Actor (void)
 To avoid warnings. More...
 
virtual size_t dispose (Space &home)
 Delete actor and return its size. More...
 

Static Public Member Functions

static void post (Home home, void(*f)(Space &))
 Post brancher. More...
 
- Static Public Member Functions inherited from Gecode::Actor
static void * operator new (size_t s)
 Not used. More...
 
static void operator delete (void *p)
 Not used. More...
 
static void * operator new (size_t s, Space &home)
 Allocate memory from space. More...
 
static void operator delete (void *p, Space &home)
 No-op for exceptions. More...
 

Protected Member Functions

 FunctionBranch (Home home, void(*f0)(Space &))
 Construct brancher. More...
 
 FunctionBranch (Space &home, bool share, FunctionBranch &b)
 Copy constructor. More...
 
- Protected Member Functions inherited from Gecode::Brancher
 Brancher (Home home)
 Constructor for creation. More...
 
 Brancher (Space &home, bool share, Brancher &b)
 Constructor for cloning b. More...
 

Protected Attributes

void(* f )(Space &)
 Function to call. More...
 
bool done
 Call function just once. More...
 

Detailed Description

Brancher for calling a function

Definition at line 45 of file branch.cpp.

Constructor & Destructor Documentation

◆ FunctionBranch() [1/2]

Gecode::FunctionBranch::FunctionBranch ( Home  home,
void(*)(Space &)  f0 
)
inlineprotected

Construct brancher.

Definition at line 64 of file branch.cpp.

◆ FunctionBranch() [2/2]

Gecode::FunctionBranch::FunctionBranch ( Space home,
bool  share,
FunctionBranch b 
)
inlineprotected

Copy constructor.

Definition at line 67 of file branch.cpp.

Member Function Documentation

◆ status()

virtual bool Gecode::FunctionBranch::status ( const Space ) const
inlinevirtual

Check status of brancher, return true if alternatives left.

Implements Gecode::Brancher.

Definition at line 71 of file branch.cpp.

◆ choice() [1/2]

virtual const Choice* Gecode::FunctionBranch::choice ( Space )
inlinevirtual

Return choice.

Implements Gecode::Brancher.

Definition at line 75 of file branch.cpp.

◆ choice() [2/2]

virtual const Choice* Gecode::FunctionBranch::choice ( const Space ,
Archive  
)
inlinevirtual

Return choice.

Implements Gecode::Brancher.

Definition at line 80 of file branch.cpp.

◆ commit()

virtual ExecStatus Gecode::FunctionBranch::commit ( Space home,
const Choice ,
unsigned int   
)
inlinevirtual

Perform commit.

Implements Gecode::Brancher.

Definition at line 85 of file branch.cpp.

◆ print()

virtual void Gecode::FunctionBranch::print ( const Space ,
const Choice ,
unsigned int  ,
std::ostream &  o 
) const
inlinevirtual

Print explanation.

Reimplemented from Gecode::Brancher.

Definition at line 92 of file branch.cpp.

◆ copy()

virtual Actor* Gecode::FunctionBranch::copy ( Space home,
bool  share 
)
inlinevirtual

Copy brancher.

Implements Gecode::Actor.

Definition at line 97 of file branch.cpp.

◆ post()

static void Gecode::FunctionBranch::post ( Home  home,
void(*)(Space &)  f 
)
inlinestatic

Post brancher.

Definition at line 101 of file branch.cpp.

Member Data Documentation

◆ f

void(* Gecode::FunctionBranch::f) (Space &)
protected

Function to call.

Definition at line 60 of file branch.cpp.

◆ done

bool Gecode::FunctionBranch::done
protected

Call function just once.

Definition at line 62 of file branch.cpp.


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