FOSSredder 0.5.0
Loading...
Searching...
No Matches
core::domain::Year Class Reference

#include <Year.h>

Public Member Functions

int value () const noexcept
 Year ()=default
 Year (int value)
 Creates a normalized year value from raw input.
bool empty () const noexcept
 Checks whether the stored value is empty.

Static Public Member Functions

static constexpr int minValue () noexcept
 Returns the minimum supported year.
static constexpr int maxValue () noexcept
 Returns the maximum supported year.
static bool isValid (int value) noexcept
 Checks whether a raw year is valid.
static int normalize (int value) noexcept
 Normalizes a raw year value.

Detailed Description

Definition at line 10 of file Year.h.

Constructor & Destructor Documentation

◆ Year() [1/2]

core::domain::Year::Year ( )
default
Here is the call graph for this function:

◆ Year() [2/2]

core::domain::Year::Year ( int value)
explicit

Creates a normalized year value from raw input.

Parameters
valueRaw year.

Definition at line 17 of file Year.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ empty()

bool core::domain::Year::empty ( ) const
noexcept

Checks whether the stored value is empty.

Returns
true when no valid year is stored.

Definition at line 38 of file Year.cpp.

Here is the caller graph for this function:

◆ isValid()

bool core::domain::Year::isValid ( int value)
staticnoexcept

Checks whether a raw year is valid.

Parameters
valueRaw year.
Returns
true when the year lies within the supported range.

Definition at line 30 of file Year.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ maxValue()

int core::domain::Year::maxValue ( )
staticconstexprnoexcept

Returns the maximum supported year.

Returns
Largest accepted year.

Definition at line 26 of file Year.cpp.

Here is the caller graph for this function:

◆ minValue()

int core::domain::Year::minValue ( )
staticconstexprnoexcept

Returns the minimum supported year.

Returns
Smallest accepted year.

Definition at line 22 of file Year.cpp.

Here is the caller graph for this function:

◆ normalize()

int core::domain::Year::normalize ( int value)
staticnoexcept

Normalizes a raw year value.

Parameters
valueRaw year.
Returns
The year when valid, otherwise 0.

Definition at line 34 of file Year.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ value()

int core::domain::Year::value ( ) const
noexcept

Definition at line 20 of file Year.cpp.

Here is the caller graph for this function:

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