OpenStudio:utilities
Loading...
Searching...
No Matches
openstudio::NthDayOfWeekInMonth Class Reference

#include <Date.hpp>

+ Inheritance diagram for openstudio::NthDayOfWeekInMonth:

Public Types

enum  domain { BOOST_PP_SEQ_FOR_EACH =(OPENSTUDIO_ENUM_DOMAIN_ELEM, NthDayOfWeekInMonth, ((first)(first)(boost::gregorian::nth_day_of_the_week_in_month::first)) ((second)(second)(boost::gregorian::nth_day_of_the_week_in_month::second)) ((third)(third)(boost::gregorian::nth_day_of_the_week_in_month::third)) ((fourth)(fourth)(boost::gregorian::nth_day_of_the_week_in_month::fourth)) ((fifth)(fifth)(boost::gregorian::nth_day_of_the_week_in_month::fifth))) }
 

Public Member Functions

 NthDayOfWeekInMonth ()
 
 NthDayOfWeekInMonth (const std::string &t_name)
 
 NthDayOfWeekInMonth (int t_value)
 
domain value () const
 
- Public Member Functions inherited from EnumBase< NthDayOfWeekInMonth >
 EnumBase ()=delete
 Default constructor.
 
 EnumBase (const std::string &t_value)
 Construct from t_value.
 
 EnumBase (int t_value)
 Construct from t_value.
 
int integer_value () const
 Returns this instance's current value (as an integer).
 
int lookupValue (int t_value)
 Returns t_value if it is in the domain.
 
int lookupValue (std::string t_name)
 Returns the (integer) value associated with t_name, as determined by case-insensitive comparison to the enumerated names and descriptions.
 
bool operator!= (const EnumBase< NthDayOfWeekInMonth > &other) const
 
bool operator< (const EnumBase< NthDayOfWeekInMonth > &other) const
 
bool operator<= (const EnumBase< NthDayOfWeekInMonth > &other) const
 
bool operator== (const EnumBase< NthDayOfWeekInMonth > &other) const
 
bool operator> (const EnumBase< NthDayOfWeekInMonth > &other) const
 
bool operator>= (const EnumBase< NthDayOfWeekInMonth > &other) const
 
void setValue (int t_value)
 Set this instance's value to t_value.
 
std::string valueDescription () const
 Returns the description associated with this instance's current value.
 
std::string valueName () const
 Returns the name associated with this instance's current value.
 

Static Public Member Functions

static std::string enumName ()
 
- Static Public Member Functions inherited from EnumBase< NthDayOfWeekInMonth >
static const std::map< int, std::string > & getDescriptions ()
 
static const std::map< std::string, int > & getLookupMap ()
 
static const std::map< int, std::string > & getNames ()
 
static const std::set< int > & getValues ()
 Returns the set of all values in this enum's domain.
 
static void initialize ()
 
static std::string valueDescription (int t_value)
 Returns the description associated with t_value, if it exists.
 
static std::string valueName (int t_value)
 Returns the name associated with t_value, if it exists.
 

Additional Inherited Members

- Protected Attributes inherited from EnumBase< NthDayOfWeekInMonth >
int m_value
 

Detailed Description

NthDayOfWeekInMonth is an enum for the nth DayOfWeek in MonthOfYear (e.g.

first Saturday in January).

The fifth NthDayOfWeekInMonth is equivalent to the last DayOfWeek in MonthOfYear. See the OPENSTUDIO_ENUM documentation in utilities/core/Enum.hpp for documentation of the class structure. The actual macro call is:

OPENSTUDIO_ENUM( NthDayOfWeekInMonth,
((first)(first)(boost::gregorian::nth_day_of_the_week_in_month::first))
((second)(second)(boost::gregorian::nth_day_of_the_week_in_month::second))
((third)(third)(boost::gregorian::nth_day_of_the_week_in_month::third))
((fourth)(fourth)(boost::gregorian::nth_day_of_the_week_in_month::fourth))
((fifth)(fifth)(boost::gregorian::nth_day_of_the_week_in_month::fifth))
);
NthDayOfWeekInMonth is an enum for the nth DayOfWeek in MonthOfYear (e.g.
Definition Date.hpp:127

Member Enumeration Documentation

◆ domain

Enumerator
BOOST_PP_SEQ_FOR_EACH 

Constructor & Destructor Documentation

◆ NthDayOfWeekInMonth() [1/3]

openstudio::NthDayOfWeekInMonth::NthDayOfWeekInMonth ( )
inline

◆ NthDayOfWeekInMonth() [2/3]

openstudio::NthDayOfWeekInMonth::NthDayOfWeekInMonth ( const std::string & t_name)
inline

◆ NthDayOfWeekInMonth() [3/3]

openstudio::NthDayOfWeekInMonth::NthDayOfWeekInMonth ( int t_value)
inline

Member Function Documentation

◆ enumName()

static std::string openstudio::NthDayOfWeekInMonth::enumName ( )
inlinestatic

◆ value()

domain openstudio::NthDayOfWeekInMonth::value ( ) const
inline