NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
date::detail::Rule Class Reference

#include <tz_private.h>

Collaboration diagram for date::detail::Rule:

Public Member Functions

 Rule ()=default
 
 Rule (const std::string &s)
 
 Rule (const Rule &r, date::year starting_year, date::year ending_year)
 
const std::string & name () const
 
const std::string & abbrev () const
 
const MonthDayTimemdt () const
 
const date::yearstarting_year () const
 
const date::yearending_year () const
 
const std::chrono::minutes & save () const
 

Static Public Member Functions

static void split_overlaps (std::vector< Rule > &rules)
 

Private Member Functions

date::day day () const
 
date::month month () const
 

Static Private Member Functions

static void split_overlaps (std::vector< Rule > &rules, std::size_t i, std::size_t &e)
 
static bool overlaps (const Rule &x, const Rule &y)
 
static void split (std::vector< Rule > &rules, std::size_t i, std::size_t k, std::size_t &e)
 

Private Attributes

std::string name_
 
date::year starting_year_ {0}
 
date::year ending_year_ {0}
 
MonthDayTime starting_at_
 
std::chrono::minutes save_ {0}
 
std::string abbrev_
 

Friends

bool operator== (const Rule &x, const Rule &y)
 
bool operator< (const Rule &x, const Rule &y)
 
bool operator== (const Rule &x, const date::year &y)
 
bool operator< (const Rule &x, const date::year &y)
 
bool operator== (const date::year &x, const Rule &y)
 
bool operator< (const date::year &x, const Rule &y)
 
bool operator== (const Rule &x, const std::string &y)
 
bool operator< (const Rule &x, const std::string &y)
 
bool operator== (const std::string &x, const Rule &y)
 
bool operator< (const std::string &x, const Rule &y)
 
std::ostream & operator<< (std::ostream &os, const Rule &r)
 

Detailed Description

Definition at line 148 of file tz_private.h.

Constructor & Destructor Documentation

◆ Rule() [1/3]

date::detail::Rule::Rule ( )
default

◆ Rule() [2/3]

date::detail::Rule::Rule ( const std::string &  s)
explicit

Definition at line 1098 of file tz.cpp.

References date::year::max(), date::year::min(), and date::parse_signed_time().

Here is the call graph for this function:

◆ Rule() [3/3]

date::detail::Rule::Rule ( const Rule r,
date::year  starting_year,
date::year  ending_year 
)

Definition at line 1162 of file tz.cpp.

Member Function Documentation

◆ abbrev()

const std::string & date::detail::Rule::abbrev ( ) const
inline

Definition at line 164 of file tz_private.h.

References abbrev_.

Referenced by date::time_zone::adjust_infos().

◆ day()

date::day date::detail::Rule::day ( ) const
private

Definition at line 1264 of file tz.cpp.

References date::day::day().

Referenced by date::detail::operator<(), and date::detail::operator==().

Here is the call graph for this function:

◆ ending_year()

const date::year & date::detail::Rule::ending_year ( ) const
inline

Definition at line 168 of file tz_private.h.

References ending_year_.

Referenced by date::find_next_rule(), and date::find_previous_rule().

◆ mdt()

const MonthDayTime & date::detail::Rule::mdt ( ) const
inline

Definition at line 166 of file tz_private.h.

References starting_at_.

◆ month()

date::month date::detail::Rule::month ( ) const
private

Definition at line 1270 of file tz.cpp.

References date::month::month().

Referenced by date::detail::operator<(), and date::detail::operator==().

Here is the call graph for this function:

◆ name()

const std::string & date::detail::Rule::name ( ) const
inline

◆ overlaps()

bool date::detail::Rule::overlaps ( const Rule x,
const Rule y 
)
staticprivate

Definition at line 1289 of file tz.cpp.

References ending_year_, and starting_year_.

◆ save()

const std::chrono::minutes & date::detail::Rule::save ( ) const
inline

Definition at line 169 of file tz_private.h.

References save_.

Referenced by date::find_rule_for_zone().

◆ split()

void date::detail::Rule::split ( std::vector< Rule > &  rules,
std::size_t  i,
std::size_t  k,
std::size_t &  e 
)
staticprivate

Definition at line 1304 of file tz.cpp.

◆ split_overlaps() [1/2]

void date::detail::Rule::split_overlaps ( std::vector< Rule > &  rules)
static

Definition at line 1397 of file tz.cpp.

References date::max_year, and date::min_year.

Referenced by date::init_tzdb().

◆ split_overlaps() [2/2]

void date::detail::Rule::split_overlaps ( std::vector< Rule > &  rules,
std::size_t  i,
std::size_t &  e 
)
staticprivate

Definition at line 1373 of file tz.cpp.

References split().

Here is the call graph for this function:

◆ starting_year()

const date::year & date::detail::Rule::starting_year ( ) const
inline

Friends And Related Function Documentation

◆ operator< [1/5]

bool operator< ( const date::year x,
const Rule y 
)
friend

◆ operator< [2/5]

bool operator< ( const Rule x,
const date::year y 
)
friend

◆ operator< [3/5]

bool operator< ( const Rule x,
const Rule y 
)
friend

◆ operator< [4/5]

bool operator< ( const Rule x,
const std::string &  y 
)
friend

◆ operator< [5/5]

bool operator< ( const std::string &  x,
const Rule y 
)
friend

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Rule r 
)
friend

◆ operator== [1/5]

bool operator== ( const date::year x,
const Rule y 
)
friend

◆ operator== [2/5]

bool operator== ( const Rule x,
const date::year y 
)
friend

◆ operator== [3/5]

bool operator== ( const Rule x,
const Rule y 
)
friend

◆ operator== [4/5]

bool operator== ( const Rule x,
const std::string &  y 
)
friend

◆ operator== [5/5]

bool operator== ( const std::string &  x,
const Rule y 
)
friend

Member Data Documentation

◆ abbrev_

std::string date::detail::Rule::abbrev_
private

Definition at line 156 of file tz_private.h.

Referenced by abbrev(), and date::detail::operator<<().

◆ ending_year_

date::year date::detail::Rule::ending_year_ {0}
private

◆ name_

std::string date::detail::Rule::name_
private

◆ save_

std::chrono::minutes date::detail::Rule::save_ {0}
private

Definition at line 155 of file tz_private.h.

Referenced by date::detail::operator<<(), date::detail::operator==(), and save().

◆ starting_at_

MonthDayTime date::detail::Rule::starting_at_
private

Definition at line 154 of file tz_private.h.

Referenced by mdt(), and date::detail::operator<<().

◆ starting_year_

date::year date::detail::Rule::starting_year_ {0}
private

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