Cppcheck
|
value class More...
#include <mathlib.h>
Public Member Functions | |
value (const std::string &s) | |
std::string | str () const |
bool | isInt () const |
bool | isFloat () const |
double | getDoubleValue () const |
int | compare (const value &v) const |
value | add (int v) const |
value | shiftLeft (const value &v) const |
value | shiftRight (const value &v) const |
Static Public Member Functions | |
static value | calc (char op, const value &v1, const value &v2) |
Private Types | |
enum class | Type { INT , LONG , LONGLONG , FLOAT } |
Private Member Functions | |
void | promote (const value &v) |
Private Attributes | |
long long | mIntValue {} |
double | mDoubleValue {} |
enum MathLib::value::Type | mType |
bool | mIsUnsigned {} |
|
strongprivate |
|
explicit |
Definition at line 40 of file mathlib.cpp.
References FLOAT, INT, MathLib::isFloat(), MathLib::isInt(), MathLib::isIntHex(), LONG, LONGLONG, mDoubleValue, mIntValue, mIsUnsigned, mType, MathLib::toBigNumber(), and MathLib::toDoubleNumber().
MathLib::value MathLib::value::add | ( | int | v | ) | const |
Definition at line 254 of file mathlib.cpp.
References isInt(), mDoubleValue, and mIntValue.
|
static |
Definition at line 125 of file mathlib.cpp.
References getDoubleValue(), isFloat(), mDoubleValue, mIntValue, mIsUnsigned, and promote().
Referenced by operator%(), operator&(), operator*(), operator+(), operator-(), operator/(), operator^(), and operator|().
int MathLib::value::compare | ( | const value & | v | ) | const |
Definition at line 226 of file mathlib.cpp.
References getDoubleValue(), isFloat(), mDoubleValue, mIntValue, mIsUnsigned, and promote().
|
inline |
|
inline |
Definition at line 53 of file mathlib.h.
Referenced by calc(), compare(), and TemplateSimplifier::getTemplateInstantiations().
|
inline |
Definition at line 50 of file mathlib.h.
Referenced by add(), TemplateSimplifier::getTemplateInstantiations(), promote(), shiftLeft(), shiftRight(), and TemplateSimplifier::simplifyNumericCalculations().
|
private |
Definition at line 108 of file mathlib.cpp.
References FLOAT, MathLib::isFloat(), isInt(), MathLib::isInt(), mIsUnsigned, and mType.
MathLib::value MathLib::value::shiftLeft | ( | const value & | v | ) | const |
Definition at line 264 of file mathlib.cpp.
References MathLib::bigint_bits, isInt(), MathLib::isInt(), and mIntValue.
Referenced by operator<<().
MathLib::value MathLib::value::shiftRight | ( | const value & | v | ) | const |
Definition at line 276 of file mathlib.cpp.
References MathLib::bigint_bits, isInt(), MathLib::isInt(), and mIntValue.
Referenced by operator>>().
std::string MathLib::value::str | ( | ) | const |
Definition at line 74 of file mathlib.cpp.
References FLOAT, LONG, and LONGLONG.
Referenced by MathLib::toString().
|
private |
|
private |
Definition at line 40 of file mathlib.h.
Referenced by add(), calc(), compare(), shiftLeft(), shiftRight(), and value().
|
private |
|
private |