Physical Quantities  v1.0.0
C++ library of physical quantities, physical models, and units of measure for scientific computing. https://github.com/acodcha/phq
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
PhQ::Dimension::Time Class Reference

Base physical dimension of time. Typically denoted "T". One of seven independent base physical dimensions that form the physical dimension set of any unit of measure or physical quantity. Part of PhQ::Dimensions. More...

#include "Time.hpp"

Public Member Functions

constexpr Time ()=default
 Default constructor. Constructs a base physical dimension of time with a value of zero.
 
constexpr Time (const int8_t value)
 Constructor. Constructs a base physical dimension of time with a given value.
 
 ~Time () noexcept=default
 Destructor. Destroys this base physical dimension of time.
 
constexpr Time (const Time &other)=default
 Copy constructor. Constructs a base physical dimension of time by copying another one.
 
constexpr Timeoperator= (const Time &other)=default
 Copy assignment operator. Assigns the value of this base physical dimension of time by copying from another one.
 
constexpr Time (Time &&other) noexcept=default
 Move constructor. Constructs a base physical dimension of time by moving another one.
 
constexpr Timeoperator= (Time &&other) noexcept=default
 Move assignment operator. Assigns the value of this base physical dimension of time by moving another one.
 
constexpr int8_t Value () const noexcept
 Value of this base physical dimension.
 
std::string Print () const noexcept
 Prints this base physical dimension as a string.
 

Static Public Member Functions

static std::string_view Abbreviation () noexcept
 Abbreviation of this base physical dimension.
 
static std::string_view Label () noexcept
 Label of this base physical dimension.
 

Private Attributes

int8_t value {0}
 Value of this base physical dimension.
 

Detailed Description

Base physical dimension of time. Typically denoted "T". One of seven independent base physical dimensions that form the physical dimension set of any unit of measure or physical quantity. Part of PhQ::Dimensions.

Definition at line 40 of file Time.hpp.

Constructor & Destructor Documentation

◆ Time() [1/4]

constexpr PhQ::Dimension::Time::Time ( )
constexprdefault

Default constructor. Constructs a base physical dimension of time with a value of zero.

◆ Time() [2/4]

constexpr PhQ::Dimension::Time::Time ( const int8_t  value)
inlineexplicitconstexpr

Constructor. Constructs a base physical dimension of time with a given value.

Definition at line 46 of file Time.hpp.

◆ ~Time()

PhQ::Dimension::Time::~Time ( )
defaultnoexcept

Destructor. Destroys this base physical dimension of time.

◆ Time() [3/4]

constexpr PhQ::Dimension::Time::Time ( const Time other)
constexprdefault

Copy constructor. Constructs a base physical dimension of time by copying another one.

◆ Time() [4/4]

constexpr PhQ::Dimension::Time::Time ( Time &&  other)
constexprdefaultnoexcept

Move constructor. Constructs a base physical dimension of time by moving another one.

Member Function Documentation

◆ Abbreviation()

static std::string_view PhQ::Dimension::Time::Abbreviation ( )
inlinestaticnoexcept

Abbreviation of this base physical dimension.

Definition at line 71 of file Time.hpp.

Referenced by Print().

◆ Label()

static std::string_view PhQ::Dimension::Time::Label ( )
inlinestaticnoexcept

Label of this base physical dimension.

Definition at line 76 of file Time.hpp.

Referenced by PhQ::Dimensions::JSON(), PhQ::Dimensions::XML(), and PhQ::Dimensions::YAML().

◆ operator=() [1/2]

constexpr Time & PhQ::Dimension::Time::operator= ( const Time other)
constexprdefault

Copy assignment operator. Assigns the value of this base physical dimension of time by copying from another one.

◆ operator=() [2/2]

constexpr Time & PhQ::Dimension::Time::operator= ( Time &&  other)
constexprdefaultnoexcept

Move assignment operator. Assigns the value of this base physical dimension of time by moving another one.

◆ Print()

std::string PhQ::Dimension::Time::Print ( ) const
inlinenoexcept

Prints this base physical dimension as a string.

Definition at line 81 of file Time.hpp.

References Abbreviation(), and value.

Referenced by PhQ::Dimension::operator<<(), and PhQ::Dimensions::Print().

◆ Value()

constexpr int8_t PhQ::Dimension::Time::Value ( ) const
inlineconstexprnoexcept

Value of this base physical dimension.

Definition at line 66 of file Time.hpp.

References value.

Referenced by PhQ::Dimensions::JSON(), PhQ::Dimensions::XML(), and PhQ::Dimensions::YAML().

Member Data Documentation

◆ value

int8_t PhQ::Dimension::Time::value {0}
private

Value of this base physical dimension.

Definition at line 96 of file Time.hpp.

Referenced by Print(), and Value().


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