Gecode::Reflection::ActorSpec Class Reference
[Reflection API]
Detailed Description
Actor specificationAn ActorSpec contains all the information that characterizes an Actor. The specifications for all the actors in a Space object can be accessed using an ActorSpecIter.
Each ActorSpec describes either a Branching or a Propagator (reflected by ActorSpec::isBranching). As a user of the Reflection API, you can access the information describing an Actor as an array of arguments, represented as objects of the Arg class.
Every propagator and branching must be able to return a specification through the virtual function Actor::spec. If you use one of the convenience classes like BinaryPropagator, have a look at the implementation of AbsBnd::spec. If you subclass Propagator directly, or you have additional arguments that have to be put into the ActorSpec, please look at BinaryPropagator::spec.
Definition at line 350 of file reflection.icc.
Actor information | |
Support::Symbol | ati (void) const |
Return actor type identifier. | |
int | noOfArgs (void) const |
Return number of arguments. | |
void | checkArity (int n) const |
Check that the number of arguments is n, throw exception otherwise. | |
Arg * | operator[] (int i) const |
Return argument i. | |
bool | isBranching (void) const |
Return whether the actor is a branching. | |
int | queue (void) const |
Return queue where the actor is currently scheduled Only valid if isBranching returns false. | |
Populating the specification | |
void | add (Arg *arg) |
Add arg to the specification (as last argument). | |
Public Member Functions | |
ActorSpec (void) | |
Construct empty ActorSpec. | |
ActorSpec (const Support::Symbol &name) | |
Construct actor specification with name. | |
ActorSpec (const ActorSpec &s) | |
Copy constructor. | |
const ActorSpec & | operator= (const ActorSpec &s) |
Assignment operator. | |
~ActorSpec (void) | |
Destructor. | |
Related Functions | |
(Note that these are not member functions.) | |
Gecode::Reflection::ActorSpec | operator<< (Gecode::Reflection::ActorSpec s, Gecode::Reflection::Arg *arg) |
Add a to specification. | |
Gecode::Reflection::ActorSpec | operator<< (Gecode::Reflection::ActorSpec s, int i) |
Add i to specification. | |
Gecode::Reflection::ActorSpec | operator<< (Gecode::Reflection::ActorSpec s, unsigned int i) |
Add i to specification. | |
Gecode::Reflection::ActorSpec | operator<< (Gecode::Reflection::ActorSpec s, double i) |
Add d to specification, where d is cast into an integer. | |
Classes | |
class | Arguments |
Implementation of an ActorSpec, holding all information about an actor. More... |
Constructor & Destructor Documentation
Gecode::Reflection::ActorSpec::ActorSpec | ( | void | ) |
Gecode::Reflection::ActorSpec::ActorSpec | ( | const Support::Symbol & | name | ) |
Gecode::Reflection::ActorSpec::ActorSpec | ( | const ActorSpec & | s | ) |
Gecode::Reflection::ActorSpec::~ActorSpec | ( | void | ) |
Member Function Documentation
Support::Symbol Gecode::Reflection::ActorSpec::ati | ( | void | ) | const |
int Gecode::Reflection::ActorSpec::noOfArgs | ( | void | ) | const |
void Gecode::Reflection::ActorSpec::checkArity | ( | int | n | ) | const |
Check that the number of arguments is n, throw exception otherwise.
Definition at line 700 of file reflection.cc.
Arg * Gecode::Reflection::ActorSpec::operator[] | ( | int | i | ) | const |
bool Gecode::Reflection::ActorSpec::isBranching | ( | void | ) | const |
int Gecode::Reflection::ActorSpec::queue | ( | void | ) | const |
Return queue where the actor is currently scheduled Only valid if isBranching returns false.
Definition at line 721 of file reflection.cc.
void Gecode::Reflection::ActorSpec::add | ( | Arg * | arg | ) |
Friends And Related Function Documentation
Gecode::Reflection::ActorSpec operator<< | ( | Gecode::Reflection::ActorSpec | s, | |
Gecode::Reflection::Arg * | arg | |||
) | [related] |
Gecode::Reflection::ActorSpec operator<< | ( | Gecode::Reflection::ActorSpec | s, | |
int | i | |||
) | [related] |
Gecode::Reflection::ActorSpec operator<< | ( | Gecode::Reflection::ActorSpec | s, | |
unsigned int | i | |||
) | [related] |
Gecode::Reflection::ActorSpec operator<< | ( | Gecode::Reflection::ActorSpec | s, | |
double | i | |||
) | [related] |
Add d to specification, where d is cast into an integer.
Definition at line 446 of file reflection.icc.
The documentation for this class was generated from the following files:
- gecode/kernel/reflection.icc (Revision: 7297)
- gecode/kernel/reflection.cc (Revision: 7297)