Cortex iOS
 All Classes Functions Properties
Coach Class Reference

#import <Coach.h>

Inheritance diagram for Coach:
BioRhythmCoach ExerciseCoach JetlagCoach MentalResilienceCoach ShiftWorkCoach SleepDurationCoach

Instance Methods

(id) - init
 
(NSArray *) - getCurrentTasks
 
(NSArray *) - getFutureTasksFrom:to:
 
(NSArray *) - getPastTasksFrom:to:
 
(NSArray *) - getAllTasksFrom:to:
 
(void) - pause
 
(void) - resume
 
(Task *) - setValue:forTask:
 

Class Methods

(NSString *) + stringFromCoachType:
 
(CoachType) + coachTypeFromString:
 

Properties

CoachType type
 Type to identifies the coach.
 

Detailed Description

Base class for all coaches. Coaches do nothing until a goal has been set. Then they will start producing messages and tasks. It's up to the application to communicate the tasks and messages to the user. When using CSCoachingEngine to get the coaches they will automatically be started upon a restart.

Method Documentation

- (NSArray *) getAllTasksFrom: (NSDate*)  from
to: (NSDate*)  to 

Return all tasks for the specified time period This is simply a convenient function that merges the past, current and future tasks.

- (NSArray *) getCurrentTasks

Return all tasks the coach has set for the user.

Returns
An NSArray* of Task* objects.
- (NSArray *) getFutureTasksFrom: (NSDate*)  from
to: (NSDate*)  to 

Return tasks planned for the future specified time period.

Returns
An NSArray* of Task* objects.
- (NSArray *) getPastTasksFrom: (NSDate*)  from
to: (NSDate*)  to 

Return all tasks the coach has set in the past for the specified time period.

Returns
An NSArray* of Task* objects.
- (void) pause

Pause the coach. This function can be used to pause the coach temporarily, e.g. when the user is on a holiday.

- (void) resume

Resume coach Resumes the coach if it was paused

- (Task *) setValue: (NSDictionary*)  dateValue
forTask: (Task*)  task 

Set the value for a task manually. You probably want to use the coache's specific setValueManually function instead of this one.

Parameters
dateValueNSDictionary with "date" and @"value" keys containing the new value.
thetask for which the value should be updated
Returns
the updated task

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