AIM
 All Classes Functions Variables Typedefs Enumerations
CoachingEngine::TaskDescription Class Reference

#include <TaskDescription.h>

Inheritance diagram for CoachingEngine::TaskDescription:
CoachingEngine::Task CoachingEngine::BiorhythmTask CoachingEngine::CalibrationTask CoachingEngine::JetLagTask CoachingEngine::MentalResilienceTask CoachingEngine::ShiftWorkTask CoachingEngine::SleepDurationTask CoachingEngine::TimeActiveTask

Public Types

enum  Status { UNKNOWN, SUCCEEDED, FAILED }
 
enum  Type {
  NONE = 0, BE_ACTIVE, SLEEP, BE_RESILIENT,
  CALIBRATING, SLEEP_PERIOD_STAY_AWAKE, SLEEP_PERIOD_GO_TO_SLEEP, TAKE_MELATONIN,
  SLEEPY, UNWINDING, WAKING_UP, ACTIVE,
  BRIGHT_LIGHT, DIMMED_LIGHT, EXERCISE, TAKE_CAFFEINE,
  HAVE_BREAKFAST, HAVE_LUNCH, HAVE_DINNER, HAVE_SNACK,
  EAT_EXTRA_TODAY, FIRST_NIGHT_MELATONIN, FULLY_ADJUSTED, TASK_MR_WORRIES,
  TASK_MR_CONTROL, TASK_MR_SUPPORT, TASK_MR_FLEXIBILITY, TASK_MR_CONFIDENCE,
  TASK_MR_MOTIVATION, TASK_MR_RELAXATION
}
 

Public Member Functions

 TaskDescription (Type taskTypeId, double startDate, double endDate, std::string description, AIMValue target)
 
 TaskDescription (const TaskDescription &other)
 
 TaskDescription ()
 
virtual double getStartDate () const
 
virtual double getEndDate () const
 
virtual std::string getDescription () const
 
virtual AIMValue getTarget () const
 
virtual AIMValue getCurrentValue () const
 
virtual Status getStatus () const
 
virtual Type getTaskType () const
 
virtual bool isCompleted ()
 
virtual AIMValue aimValueRepresentation ()
 

Static Public Member Functions

static std::string taskTypeToString (Type taskType)
 
static Type stringToTaskType (std::string taskType)
 

Protected Attributes

Type taskType
 
double startDate
 
double endDate
 
std::string description
 
AIMValue target
 
AIMValue currentValue
 
Status status
 
bool completed
 

Detailed Description

Description of a task that can be set by the coach. Represents the task as communicated to the 'outside' world.

Member Enumeration Documentation

Status representing whether a task has been achieved.

Task type. Note: This should be in sync with the database backend in the cloud and the mobile platforms in Cortex!

Constructor & Destructor Documentation

CoachingEngine::TaskDescription::TaskDescription ( Type  taskTypeId,
double  startDate,
double  endDate,
std::string  description,
AIMValue  target 
)

Construct a TaskDescription with all immutable fields.

Parameters
taskTypeIdIdentifier for the task type.
startDateUnix timestamp when the task starts.
endDateUnix timestamp when the task ends.
descriptionHuman readable description of the task.
targetTarget of the task.
CoachingEngine::TaskDescription::TaskDescription ( const TaskDescription other)

Copy constructor.

CoachingEngine::TaskDescription::TaskDescription ( )

Default constructor Needed for the TaskVector template in swig

Member Function Documentation

AIMValue CoachingEngine::TaskDescription::aimValueRepresentation ( )
virtual

Return an aimvalue representation of the task.

virtual AIMValue CoachingEngine::TaskDescription::getCurrentValue ( ) const
inlinevirtual

Get current value of the task. The current value is related to the target value.

Returns
current value of the task
virtual std::string CoachingEngine::TaskDescription::getDescription ( ) const
inlinevirtual

Get human readable description of the task.

Returns
end date of the task as Unix timestamp.
virtual double CoachingEngine::TaskDescription::getEndDate ( ) const
inlinevirtual

Get end date of the task as Unix timestamp.

Returns
end date of the task as Unix timestamp.
virtual double CoachingEngine::TaskDescription::getStartDate ( ) const
inlinevirtual

Get start date of the task as Unix timestamp.

Returns
start date of the task as Unix timestamp.
virtual Status CoachingEngine::TaskDescription::getStatus ( ) const
inlinevirtual

Get status of the task. The status represents wehther the target is achieved (SUCCEEDED), not achieved (FAILED), or this information is unknown (UNKNOWN)

Returns
status of the task.
virtual AIMValue CoachingEngine::TaskDescription::getTarget ( ) const
inlinevirtual

Get target of the task.

Returns
target of the task.
virtual Type CoachingEngine::TaskDescription::getTaskType ( ) const
inlinevirtual

Get task type identifier.

Returns
task type identifier.
virtual bool CoachingEngine::TaskDescription::isCompleted ( )
inlinevirtual

Return whether the task is completed.

Returns
whether the task is completed.

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