Loading...
Searching...
No Matches
hueplusplus::time::Weekdays Class Reference

Any number of days of the week. More...

`#include <hueplusplus/TimePattern.h>`

## Public Member Functions

| Weekdays ()
| Create with no days.
| Weekdays (int num)
| Create with the day `num`.
bool | isNone () const
| Check if no days are set.
bool | isAll () const
| Check if all days are set.
bool | isMonday () const
| Check if Monday is contained.
bool | isTuesday () const
| Check if Tuesday is contained.
bool | isWednesday () const
| Check if Wednesday is contained.
bool | isThursday () const
| Check if Thursday is contained.
bool | isFriday () const
| Check if Friday is contained.
bool | isSaturday () const
| Check if Saturday is contained.
bool | isSunday () const
| Check if Sunday is contained.
Weekdays | unionWith (Weekdays other) const
| Create set union with other Weekdays.
Weekdays | operator| (Weekdays other) const
| Create set union with other Weekdays.
std::string | toString () const
| Create a formatted, numeric string.
bool | operator== (const Weekdays &other) const
| Check whether all days are equal.
bool | operator!= (const Weekdays &other) const
| Check whether not all days are equal.

## Static Public Member Functions

static Weekdays | none ()
| Creates an empty Weekdays.
static Weekdays | all ()
| Creates set of all days.
static Weekdays | monday ()
| Creates Monday.
static Weekdays | tuesday ()
| Creates Tuesday.
static Weekdays | wednesday ()
| Creates Wednesday.
static Weekdays | thursday ()
| Creates Thursday.
static Weekdays | friday ()
| Creates Friday.
static Weekdays | saturday ()
| Creates Saturday.
static Weekdays | sunday ()
| Creates Sunday.
static Weekdays | parse (const std::string &s)
| Parse from three digit code.

## Detailed Description

Any number of days of the week.

Can be used to represent weekly repetitions only on certain days.

## Constructor & Destructor Documentation

## Weekdays() [1/2]

hueplusplus::time::Weekdays::Weekdays | ( |  | ) |

inline

Create with no days.

## Weekdays() [2/2]

hueplusplus::time::Weekdays::Weekdays | ( | int | num | ) |

inline explicit

Create with the day `num`.

Parameters

  num | Day of the week, from monday (0) to sunday (6)

## Member Function Documentation

## all()

Weekdays hueplusplus::time::Weekdays::all | ( |  | ) |

static

Creates set of all days.

## friday()

Weekdays hueplusplus::time::Weekdays::friday | ( |  | ) |

static

Creates Friday.

## isAll()

bool hueplusplus::time::Weekdays::isAll | ( |  | ) | const

Check if all days are set.

## isFriday()

bool hueplusplus::time::Weekdays::isFriday | ( |  | ) | const

Check if Friday is contained.

## isMonday()

bool hueplusplus::time::Weekdays::isMonday | ( |  | ) | const

Check if Monday is contained.

## isNone()

bool hueplusplus::time::Weekdays::isNone | ( |  | ) | const

Check if no days are set.

## isSaturday()

bool hueplusplus::time::Weekdays::isSaturday | ( |  | ) | const

Check if Saturday is contained.

## isSunday()

bool hueplusplus::time::Weekdays::isSunday | ( |  | ) | const

Check if Sunday is contained.

## isThursday()

bool hueplusplus::time::Weekdays::isThursday | ( |  | ) | const

Check if Thursday is contained.

## isTuesday()

bool hueplusplus::time::Weekdays::isTuesday | ( |  | ) | const

Check if Tuesday is contained.

## isWednesday()

bool hueplusplus::time::Weekdays::isWednesday | ( |  | ) | const

Check if Wednesday is contained.

## monday()

Weekdays hueplusplus::time::Weekdays::monday | ( |  | ) |

static

Creates Monday.

## none()

Weekdays hueplusplus::time::Weekdays::none | ( |  | ) |

static

Creates an empty Weekdays.

## operator!=()

bool hueplusplus::time::Weekdays::operator!= | ( | const Weekdays & | other | ) | const

inline

Check whether not all days are equal.

## operator==()

bool hueplusplus::time::Weekdays::operator== | ( | const Weekdays & | other | ) | const

inline

Check whether all days are equal.

## operator|()

Weekdays hueplusplus::time::Weekdays::operator| | ( | Weekdays | other | ) | const

inline

Create set union with other Weekdays.

See also
  unionWith

## parse()

Weekdays hueplusplus::time::Weekdays::parse | ( | const std::string & | s | ) |

static

Parse from three digit code.

Parameters

  s | Bitmask of days as a string

Returns
  Parsed set of weekdays

## saturday()

Weekdays hueplusplus::time::Weekdays::saturday | ( |  | ) |

static

Creates Saturday.

## sunday()

Weekdays hueplusplus::time::Weekdays::sunday | ( |  | ) |

static

Creates Sunday.

## thursday()

Weekdays hueplusplus::time::Weekdays::thursday | ( |  | ) |

static

Creates Thursday.

## toString()

std::string hueplusplus::time::Weekdays::toString | ( |  | ) | const

Create a formatted, numeric string.

Returns
  A three digit code for the days as a bitmask

## tuesday()

Weekdays hueplusplus::time::Weekdays::tuesday | ( |  | ) |

static

Creates Tuesday.

## unionWith()

Weekdays hueplusplus::time::Weekdays::unionWith | ( | Weekdays | other | ) | const

Create set union with other Weekdays.

Parameters

  other | Second set of days to combine with

Returns
  A set of days containing all days of either `this` or `other`

## wednesday()

Weekdays hueplusplus::time::Weekdays::wednesday | ( |  | ) |

static

Creates Wednesday.

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

- include/hueplusplus/TimePattern.h
- src/TimePattern.cpp