This class holds a type that represents certain period of time like year, hour, second and so on. More...
#include <date_time_facet.hpp>
Public Member Functions | |
period_type (marks::period_mark m=marks::invalid) | |
Create a period of specific type, default is invalid. More... | |
marks::period_mark | mark () const |
Get the value of marks::period_mark it was created with. More... | |
bool | operator== (period_type const &other) const |
Check if two periods are the same. More... | |
bool | operator!= (period_type const &other) const |
Check if two periods are different. More... | |
This class holds a type that represents certain period of time like year, hour, second and so on.
It can be created from either marks::period_mark type or by using shortcuts in period namespace - calling functions like period::year(), period::hour() and so on.
Basically it represents the same object as enum marks::period_mark but allows to provide save operator overloading that would not collide with casing of enum to numeric values.
|
inline |
Create a period of specific type, default is invalid.
|
inline |
Get the value of marks::period_mark it was created with.
Referenced by operator!=(), and operator==().
|
inline |
Check if two periods are different.
References mark().
|
inline |
Check if two periods are the same.
References mark().