Dokit
Internal development documentation
Loading...
Searching...
No Matches
Ratio Struct Reference

Public Member Functions

bool isValid () const
 Returns true if both num and den are non-zero.
 

Public Attributes

std::intmax_t num { 0 }
 Numerator.
 
std::intmax_t den { 0 }
 

Detailed Description

A (run-time) class approximately equivalent to the compile-time std::ratio template.

Definition at line 120 of file abstractcommand.cpp.

Member Function Documentation

◆ isValid()

bool Ratio::isValid ( ) const
inline

Returns true if both num and den are non-zero.

Definition at line 124 of file abstractcommand.cpp.

124{ return (num != 0) && (den != 0); }
std::intmax_t num
Numerator.
std::intmax_t den

References den, and num.

Referenced by AbstractCommand::parseNumber().

Here is the caller graph for this function:

Member Data Documentation

◆ den

std::intmax_t Ratio::den { 0 }

Denominator.

Definition at line 122 of file abstractcommand.cpp.

122{ 0 }; ///< Denominator.

Referenced by isValid().

◆ num

std::intmax_t Ratio::num { 0 }

Numerator.

Definition at line 121 of file abstractcommand.cpp.

121{ 0 }; ///< Numerator.

Referenced by isValid(), and AbstractCommand::parseNumber().


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