Dokit
Internal development documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
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 119 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 123 of file abstractcommand.cpp.

123{ 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 121 of file abstractcommand.cpp.

121{ 0 }; ///< Denominator.

Referenced by isValid().

◆ num

std::intmax_t Ratio::num { 0 }

Numerator.

Definition at line 120 of file abstractcommand.cpp.

120{ 0 }; ///< Numerator.

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


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