diff --git a/src/libqof/qof/gnc-int128.hpp b/src/libqof/qof/gnc-int128.hpp index 9cd8e9375c..e7c52d8f0f 100644 --- a/src/libqof/qof/gnc-int128.hpp +++ b/src/libqof/qof/gnc-int128.hpp @@ -45,8 +45,9 @@ extern "C" #include //using std::string; - -/** +/** @addtogroup GncInt128 + * @ingroup QOF + * @{ * @brief provides a 128-bit int as a base class for GncNumeric. * * All the usual operators are provided. Only the explicit integer @@ -64,9 +65,9 @@ class GncInt128 uint64_t m_lo; public: -static const unsigned int numlegs = 2; -static const unsigned int legbits = 64; -static const unsigned int maxbits = legbits * numlegs; + static const unsigned int numlegs = 2; + static const unsigned int legbits = 64; + static const unsigned int maxbits = legbits * numlegs; enum // Values for m_flags { @@ -75,14 +76,16 @@ enum // Values for m_flags overflow = 2, NaN = 4 }; -/** - * Construct a GncInt128 from two int64_t. - * - * N.B.: If the two parameters are of differing sign, it's taken to +/** @addtogroup Constructors Constructors + * Constructors are templated so that a GncInt128 can be constructed from any + * arbitrary integer type or pair of integer types. + * @note If the two parameters are of differing sign, it's taken to * mean that the lower magnitude is *reducing* the magnitude of the * upper, so the lower magnitude will be subracted from UINT64_MAX to * obtain the lower limb value. +* @{ */ +/** Default constructor. Makes 0. */ GncInt128(); template GncInt128(T lower) : GncInt128 {INT64_C(0), static_cast(lower)} @@ -119,6 +122,7 @@ enum // Values for m_flags GncInt128 (int64_t upper, uint64_t lower, unsigned char flags = '\0'); GncInt128 (uint64_t upper, uint64_t lower, unsigned char flags = '\0'); +/** @} */ /** * Clear the object. * diff --git a/src/libqof/qof/gnc-rational.hpp b/src/libqof/qof/gnc-rational.hpp index 1c4edc640f..2e04fd1ba5 100644 --- a/src/libqof/qof/gnc-rational.hpp +++ b/src/libqof/qof/gnc-rational.hpp @@ -24,6 +24,10 @@ struct GncDenom; +/** @ingroup QOF + * @brief Rational number class using GncInt128 for the numerator and denominator. + */ + class GncRational { public: diff --git a/src/libqof/qof/qof.h b/src/libqof/qof/qof.h index 282d6901e5..08baaeabb2 100644 --- a/src/libqof/qof/qof.h +++ b/src/libqof/qof/qof.h @@ -38,10 +38,6 @@ @addtogroup KVP KVP: Key-Value Pairs @ingroup QOF */ -/** - @addtogroup Math128 Math128: 128-bit Integer Math Library - @ingroup QOF -*/ /** @addtogroup Numeric Numeric: Rational Number Handling w/ Rounding Error Control @ingroup QOF