Class roman

Synopsis

#include "breeze/conversion/roman.hpp"

class roman

Description

A Roman numeral.

Methods

romanConstructs a Roman numeral corresponding to the number n.
to_stringReturns: A string containing the Roman numeral

Source

Lines 27-53 in breeze/conversion/roman.hpp.

class roman
{
public:
    //!     Constructs a Roman numeral corresponding to the number \c n.
    //!
    //!     \pre
    //!         1 <= n && n <= 3999
    // -----------------------------------------------------------------------
    explicit            roman( int n ) ;

    //!     \return
    //!         A string containing the Roman numeral. This will always
    //!         be all-uppercase. To get all-lowercase, use the stream
    //!         inserter, instead.
    //! ----------------------------------------------------------------------
    std::string         to_string() const ;

private:
    int                 m_value ;

    //!     Stream output operator: outputs the Roman numeral. The
    //!     uppercase flag (\c std::ios_base::uppercase) is supported,
    //!     so the user can obtain all-uppercase or all-lowercase.
    // -----------------------------------------------------------------------
    friend std::ostream &
                    operator <<( std::ostream &, roman const & ) ;
} ;