domain::Requirement Struct Reference

Represents a requirements of a TaskType. More...

#include <tasktype.h>

Inheritance diagram for domain::Requirement:
Inheritance graph
[legend]
Collaboration diagram for domain::Requirement:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Requirement (Type *type)
virtual bool isFulfilled (const Task *task) const =0
virtual bool canBeSuccessful (const Task *task) const =0

Public Attributes

Typetype
unsigned min
unsigned max

Detailed Description

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.

Note:
This is an abstract base class. It is up to the subclasses to properly restrict the type attribute to be of a particular Type subclass.

Definition at line 100 of file tasktype.h.


Member Function Documentation

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.


Member Data Documentation

The maximum number of object of type type needed to fulfill this requirement.

Definition at line 117 of file tasktype.h.

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.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Functions Variables Enumerations Enumerator
Generated on Thu May 27 14:20:18 2010 for MopTaskManager by  doxygen 1.6.3