hueplusplus  1.0.0
Public Member Functions | Static Public Member Functions | List of all members
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. More...
 
 Weekdays (int num)
 Create with the day num. More...
 
bool isNone () const
 Check if no days are set. More...
 
bool isAll () const
 Check if all days are set. More...
 
bool isMonday () const
 Check if Monday is contained. More...
 
bool isTuesday () const
 Check if Tuesday is contained. More...
 
bool isWednesday () const
 Check if Wednesday is contained. More...
 
bool isThursday () const
 Check if Thursday is contained. More...
 
bool isFriday () const
 Check if Friday is contained. More...
 
bool isSaturday () const
 Check if Saturday is contained. More...
 
bool isSunday () const
 Check if Sunday is contained. More...
 
Weekdays unionWith (Weekdays other) const
 Create set union with other Weekdays. More...
 
Weekdays operator| (Weekdays other) const
 Create set union with other Weekdays. More...
 
std::string toString () const
 Create a formatted, numeric string. More...
 
bool operator== (const Weekdays &other) const
 Check whether all days are equal. More...
 
bool operator!= (const Weekdays &other) const
 Check whether not all days are equal. More...
 

Static Public Member Functions

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

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)
inlineexplicit

Create with the day num.

Parameters
numDay 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
sBitmask 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
otherSecond 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: