AlarmData class handles the implementation of the actual alarm that is stored or in memory to be manipulated and used.
More...
#include <alarmData.h>
|
struct | AlarmTime |
| AlarmTime struct enables an integer pair for defining the time the alarm should be set for by hour and minute. More...
|
|
struct | Vibrate |
| Vibrate struct provides more customization over how the device will react to an alarm being triggered. More...
|
|
|
struct AlarmData::AlarmTime | AlarmData (const std::vector< Alarm::DaysOfWeek > &daysOfWeek, const AlarmTime &alarmTime, const bool &on, const std::string &meridiem, const Vibrate &vibrate const std::string &message) |
| AlarmData constructor takes in all necessary data to build a functional alarm to be stored and used in the app.
|
|
void | changeTime (const AlarmTime &newTime) |
| change the time of the alarm by creating a new AlarmTime struct after prompting. This method also updates AlarmData.meridiem
|
|
bool | toggleOnOff () |
| toggleOnOff turns the alarm on state to the opposite of what it current is set as
|
|
void | toggleMeridiem () |
| toggleMeridiem will ch age the string value to AM if currently PM and PM if currently AM. This method also updates the hour in the instances alarmTime struct
|
|
void | print () |
| Print specializes in printing the alarm in a user friendly way to the console along with the shortened day of the week strings associated with.
|
|
AlarmData class handles the implementation of the actual alarm that is stored or in memory to be manipulated and used.
◆ AlarmData()
AlarmData::AlarmData |
( |
const std::vector< Alarm::DaysOfWeek > & | daysOfWeek, |
|
|
const AlarmTime & | alarmTime, |
|
|
const bool & | on, |
|
|
const std::string & | meridiem, |
|
|
const Vibrate &vibrate const std::string & | message ) |
AlarmData constructor takes in all necessary data to build a functional alarm to be stored and used in the app.
- Parameters
-
daysOfWeek | Vector of integers correlating to the days of the week an alarm will be triggered on |
alarmTime | |
- See also
- AlarmTime struct. Gives the hour and minute the alarm should be triggered
- Parameters
-
on | Boolean indicating if the alarm is active or not |
meridiem | String indicating if the alarm is for AM or PM. Used only when creating an alarm and when showing the user |
vibrate | |
- See also
- Vibrate struct. Indicating the type of vibration pattern should be applied to the device when the alarm triggers
- Parameters
-
message | String optional. Provided to the user when the alarm triggers |
◆ changeTime()
void AlarmData::changeTime |
( |
const AlarmTime & | newTime | ) |
|
change the time of the alarm by creating a new AlarmTime struct after prompting. This method also updates AlarmData.meridiem
- Parameters
-
- See also
- AlarmTime which provides the hour and minute the alarm should trigger
◆ print()
void AlarmData::print |
( |
| ) |
|
Print specializes in printing the alarm in a user friendly way to the console along with the shortened day of the week strings associated with.
- See also
- Alarm::DaysOfWeek.
◆ toggleMeridiem()
void AlarmData::toggleMeridiem |
( |
| ) |
|
toggleMeridiem will ch age the string value to AM if currently PM and PM if currently AM. This method also updates the hour in the instances alarmTime struct
- See also
- AlarmData.alarmTime
◆ toggleOnOff()
void AlarmData::toggleOnOff |
( |
| ) |
|
toggleOnOff turns the alarm on state to the opposite of what it current is set as
- Returns
- Boolean
The documentation for this class was generated from the following files: