Generated on Mon Aug 25 11:35:53 2008 for Gecode by doxygen 1.5.6

Gecode::Reflection::ActorSpec Class Reference
[Reflection API]

List of all members.


Detailed Description

Actor specification

An 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.
Argoperator[] (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 ActorSpecoperator= (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   ) 

Construct empty ActorSpec.

Definition at line 664 of file reflection.cc.

Gecode::Reflection::ActorSpec::ActorSpec ( const Support::Symbol name  ) 

Construct actor specification with name.

Definition at line 666 of file reflection.cc.

Gecode::Reflection::ActorSpec::ActorSpec ( const ActorSpec s  ) 

Copy constructor.

Definition at line 670 of file reflection.cc.

Gecode::Reflection::ActorSpec::~ActorSpec ( void   ) 

Destructor.

Definition at line 735 of file reflection.cc.


Member Function Documentation

const ActorSpec & Gecode::Reflection::ActorSpec::operator= ( const ActorSpec s  ) 

Assignment operator.

Definition at line 676 of file reflection.cc.

Support::Symbol Gecode::Reflection::ActorSpec::ati ( void   )  const

Return actor type identifier.

Definition at line 707 of file reflection.cc.

int Gecode::Reflection::ActorSpec::noOfArgs ( void   )  const

Return number of arguments.

Definition at line 695 of file reflection.cc.

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

Return argument i.

Definition at line 688 of file reflection.cc.

bool Gecode::Reflection::ActorSpec::isBranching ( void   )  const

Return whether the actor is a branching.

Definition at line 714 of file reflection.cc.

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  ) 

Add arg to the specification (as last argument).

Definition at line 741 of file reflection.cc.


Friends And Related Function Documentation

Add a to specification.

Definition at line 433 of file reflection.icc.

Gecode::Reflection::ActorSpec operator<< ( Gecode::Reflection::ActorSpec  s,
int  i 
) [related]

Add i to specification.

Definition at line 438 of file reflection.icc.

Gecode::Reflection::ActorSpec operator<< ( Gecode::Reflection::ActorSpec  s,
unsigned int  i 
) [related]

Add i to specification.

Definition at line 442 of file reflection.icc.

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: