rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWDecimalOverflowErr< M > Class Template Reference
[Decimal Numbers]

Signals overflow problems in computations involving the Rogue Wave decimal classes. More...

#include <rw/currency/decimal.h>

Inheritance diagram for RWDecimalOverflowErr< M >:
RWExternalErr RWxmsg

List of all members.

Public Member Functions

RWDecimal< M > leftOperand () const
RWDecimal< M > rightOperand () const
RWDecimalBase::Op operation () const
const char * msg () const

Detailed Description

template<class M>
class RWDecimalOverflowErr< M >

RWDecimalOverflowErr<T> is one of the error objects used to signal problems in computations involving RWDecimal<T> and RWFixedDecimal<T> objects. The other error object is RWDecimalInexactErr<T> . See RWDecimal<T> and RWFixedDecimal<T> for details about when the error objects are used. Also, see the section on error handling in the Currency Module User's Guide for information about how to set error handlers.

Synopsis

 #include <rw/currency/decimal.h> // for RWDecimalOverflowErr<T>
                                  // and RWDecmialInexactErr<T>
 #include <rw/currency/mp2int.h>  // For RWMP2Int

 RWDecimal<RWMP2Int> x = "9999999999";
 RWDecimal<RWMP2Int> y = x*x;  // calls the overflow error handler

The following header files are available for backward compatibility:

 #include <rw/dec52.h>   // RWDecimal52InexactErr,
                         // RWDecimal52OverflowErr
 #include <rw/dec64.h>   // RWDecimal64InexactErr,
                         // RWDecimal64OverflowErr
 #include <rw/dec96.h>   // RWDecimal96InexactErr,
                         // RWDecimal96OverflowErr

Member Function Documentation

template<class M >
RWDecimal<M> RWDecimalOverflowErr< M >::leftOperand (  )  const [inline]

Returns the left operand of the operation that generated the error object.

template<class M >
const char* RWDecimalOverflowErr< M >::msg (  )  const [inline]

Returns a message describing the error.

template<class M >
RWDecimalBase::Op RWDecimalOverflowErr< M >::operation (  )  const [inline]

Returns the operation that generated the error object. The returned value RWDecimalBase::Op is an enumerated type scoped in the RWDecimalBase class.

template<class M >
RWDecimal<M> RWDecimalOverflowErr< M >::rightOperand (  )  const [inline]

Returns the right operand of the operation that generated the error object.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.