Represents a requirements of a TaskType. More...
#include <tasktype.h>
Public Member Functions | |
Requirement (Type *type) | |
virtual bool | isFulfilled (const Task *task) const =0 |
virtual bool | canBeSuccessful (const Task *task) const =0 |
Public Attributes | |
Type * | type |
unsigned | min |
unsigned | max |
Represents a requirements of a TaskType.
A requirement stores information about the Type it is for and the amount of that type that is required. It also offers methods to check if a requirement is fulfilled for a given task.
Definition at line 100 of file tasktype.h.
virtual bool domain::Requirement::canBeSuccessful | ( | const Task * | task | ) | const [pure virtual] |
Indicates whether this requirements does not prevent the given task from being in a successful state. The difference with isFulfilled is that this method returns true even if the timing constraints of this requirements are in the past but could have been fulfilled at some time.
Implemented in domain::UserRequirement, and domain::ResourceRequirement.
virtual bool domain::Requirement::isFulfilled | ( | const Task * | task | ) | const [pure virtual] |
Indicates whether this requirement is fulfilled for the given task.
Implemented in domain::UserRequirement, and domain::ResourceRequirement.
unsigned domain::Requirement::max |
The maximum number of object of type type needed to fulfill this requirement.
Definition at line 117 of file tasktype.h.
unsigned domain::Requirement::min |
The minimum number of object of type type needed to fulfill this requirement.
Definition at line 111 of file tasktype.h.
The Type this requirement is for.
Definition at line 105 of file tasktype.h.