RexxNumberString Class Reference

#include <NumberStringClass.hpp>

Inheritance diagram for RexxNumberString:
[legend]

Public Member Functions

void * operator new (size_t, size_t)
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *)
 
void operator delete (void *, size_t)
 
void operator delete (void *, void *)
 
 RexxNumberString (size_t)
 
 RexxNumberString (size_t, size_t)
 
 RexxNumberString (RESTORETYPE restoreType)
 
virtual HashCode getHashValue ()
 
void live (size_t)
 
void liveGeneral (int reason)
 
void flatten (RexxEnvelope *)
 
bool numberValue (wholenumber_t &result, size_t precision)
 
bool numberValue (wholenumber_t &result)
 
bool unsignedNumberValue (uwholenumber_t &result, size_t precision)
 
bool unsignedNumberValue (uwholenumber_t &result)
 
bool doubleValue (double &result)
 
RexxNumberStringnumberString ()
 
RexxIntegerintegerValue (size_t)
 
RexxStringmakeString ()
 
RexxArraymakeArray ()
 
RexxIntegerhasMethod (RexxString *)
 
RexxStringprimitiveMakeString ()
 
RexxStringstringValue ()
 
bool truthValue (int)
 
virtual bool logicalValue (logical_t &)
 
bool isEqual (RexxObject *)
 
virtual wholenumber_t compareTo (RexxObject *)
 
wholenumber_t strictComp (RexxObject *)
 
wholenumber_t comp (RexxObject *, RexxString *alternativeOperator=OREF_NULL, RexxInteger **alternativeOperatorResultPtr=NULL)
 
RexxIntegerequal (RexxObject *)
 
RexxIntegerstrictEqual (RexxObject *)
 
RexxIntegernotEqual (RexxObject *)
 
RexxIntegerstrictNotEqual (RexxObject *)
 
RexxIntegerisGreaterThan (RexxObject *)
 
RexxIntegerisLessThan (RexxObject *)
 
RexxIntegerisGreaterOrEqual (RexxObject *)
 
RexxIntegerisLessOrEqual (RexxObject *)
 
RexxIntegerstrictGreaterThan (RexxObject *)
 
RexxIntegerstrictLessThan (RexxObject *)
 
RexxIntegerstrictGreaterOrEqual (RexxObject *)
 
RexxIntegerstrictLessOrEqual (RexxObject *)
 
RexxObjecthashCode ()
 
RexxNumberStringclone ()
 
void setString (RexxString *)
 
void roundUp (int)
 
RexxStringformatRexx (RexxObject *, RexxObject *, RexxObject *, RexxObject *)
 
RexxStringformatInternal (size_t, size_t, size_t, size_t, RexxNumberString *, size_t, bool)
 
RexxObjectoperatorNot (RexxObject *)
 
RexxObjectevaluate (RexxActivation *, RexxExpressionStack *)
 
RexxObjectgetValue (RexxActivation *context)
 
RexxObjectgetValue (RexxVariableDictionary *dictionary)
 
RexxObjectgetRealValue (RexxActivation *)
 
RexxObjectgetRealValue (RexxVariableDictionary *)
 
RexxObjecttrunc (RexxObject *)
 
RexxObjecttruncInternal (size_t)
 
RexxObjectfloor ()
 
RexxObjectfloorInternal ()
 
RexxObjectceiling ()
 
RexxObjectceilingInternal ()
 
RexxObjectround ()
 
RexxObjectroundInternal ()
 
RexxObjectunknown (RexxString *, RexxArray *, RexxDirectory *)
 
bool isInstanceOf (RexxClass *)
 
RexxMethodinstanceMethod (RexxString *)
 
RexxSupplierinstanceMethods (RexxClass *)
 
RexxClassclassObject ()
 
RexxNumberStringcheckNumber (size_t digits)
 
RexxNumberStringprepareNumber (size_t, bool)
 
RexxNumberStringprepareOperatorNumber (size_t, size_t, bool)
 
void adjustPrecision (char *, size_t)
 
void adjustPrecision ()
 
void checkPrecision ()
 
void setNumericSettings (size_t digits, bool form)
 
void setupNumber ()
 
bool createUnsignedValue (const char *thisnum, stringsize_t intlength, int carry, wholenumber_t exponent, uwholenumber_t maxValue, uwholenumber_t &result)
 
bool createUnsignedInt64Value (const char *thisnum, stringsize_t intlength, int carry, wholenumber_t exponent, uint64_t maxValue, uint64_t &result)
 
bool checkIntegerDigits (stringsize_t numDigits, stringsize_t &numberLength, wholenumber_t &numberExponent, bool &carry)
 
bool int64Value (int64_t *result, stringsize_t numDigits)
 
bool unsignedInt64Value (uint64_t *result, stringsize_t numDigits)
 
void formatInt64 (int64_t integer)
 
void formatUnsignedInt64 (uint64_t integer)
 
RexxNumberStringaddSub (RexxNumberString *, unsigned int, size_t)
 
RexxNumberStringplus (RexxObject *)
 
RexxNumberStringminus (RexxObject *)
 
RexxNumberStringmultiply (RexxObject *)
 
RexxNumberStringdivide (RexxObject *)
 
RexxNumberStringintegerDivide (RexxObject *)
 
RexxNumberStringremainder (RexxObject *)
 
RexxNumberStringpower (RexxObject *)
 
RexxNumberStringMultiply (RexxNumberString *)
 
RexxNumberStringDivision (RexxNumberString *, unsigned int)
 
RexxNumberStringabs ()
 
RexxIntegerSign ()
 
RexxObjectnotOp ()
 
RexxNumberStringMax (RexxObject **, size_t, size_t)
 
RexxNumberStringMin (RexxObject **, size_t, size_t)
 
RexxNumberStringmaxMin (RexxObject **, size_t, size_t, unsigned int)
 
RexxObjectisInteger ()
 
RexxStringd2c (RexxObject *)
 
RexxStringd2x (RexxObject *)
 
RexxStringd2xD2c (RexxObject *, bool)
 
RexxStringconcat (RexxObject *)
 
RexxStringconcatBlank (RexxObject *)
 
RexxObjectorOp (RexxObject *)
 
RexxObjectandOp (RexxObject *)
 
RexxObjectxorOp (RexxObject *)
 
void formatNumber (wholenumber_t)
 
void formatUnsignedNumber (size_t)
 
int format (const char *, size_t)
 
void setZero ()
 
- Public Member Functions inherited from RexxNumberStringBase
 RexxNumberStringBase ()
 
void mathRound (char *)
 
char * stripLeadingZeros (char *)
 
char * adjustNumber (char *, char *, size_t, size_t)
 
- Public Member Functions inherited from RexxObject
void * operator new (size_t, RexxClass *)
 
void * operator new (size_t, RexxClass *, RexxObject **, size_t, size_t)
 
void * operator new (size_t size, void *objectPtr)
 
void operator delete (void *, void *)
 
void operator delete (void *)
 
void operator delete (void *, RexxClass *)
 
void operator delete (void *, RexxClass *, RexxObject **, size_t)
 
RexxObjectnewRexx (RexxObject **arguments, size_t argCount, size_t named_argCount)
 
RexxObjectnewObject ()
 
 operator RexxInternalObject * ()
 
 RexxObject ()
 
 RexxObject (RESTORETYPE restoreType)
 
void initializeNewObject (size_t size, size_t mark, void *vft, RexxBehaviour *b)
 
void initializeNewObject (size_t mark, void *vft, RexxBehaviour *b)
 
virtual ~RexxObject ()
 
virtual RexxObjectdefMethod (RexxString *, RexxMethod *, RexxString *a=OREF_NULL)
 
virtual RexxStringdefaultName ()
 
bool hasUninitMethod ()
 
RexxObjectinit ()
 
void uninit ()
 
RexxObjectcopy ()
 
HashCode hash ()
 
RexxTextmakeText ()
 
void copyIntoTail (RexxCompoundTail *buffer)
 
RexxTexttextValue ()
 
RexxStringrequestString ()
 
RexxStringrequestStringNoNOSTRING ()
 
RexxTextrequestText ()
 
RexxIntegerrequestInteger (size_t)
 
bool requestNumber (wholenumber_t &, size_t)
 
bool requestUnsignedNumber (stringsize_t &, size_t)
 
RexxArrayrequestArray ()
 
RexxDirectoryrequestDirectory ()
 
RexxStringrequiredString (RexxString *kind, size_t)
 
RexxStringrequiredString (RexxString *kind, const char *)
 
RexxStringrequiredString ()
 
RexxIntegerrequiredInteger (RexxString *kind, size_t, size_t)
 
wholenumber_t requiredNumber (RexxString *kind, size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
 
stringsize_t requiredPositive (RexxString *kind, size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
 
stringsize_t requiredNonNegative (RexxString *kind, size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
 
RexxObjectisInstanceOfRexx (RexxClass *)
 
RexxObjectisNilRexx ()
 
RexxMethodinstanceMethodRexx (RexxString *)
 
RexxSupplierinstanceMethodsRexx (RexxClass *)
 
RexxObjectdynamicTargetRexx (RexxObject **arguments, size_t argCount, size_t named_argCount)
 
RexxStringobjectName ()
 
RexxObjectobjectNameEquals (RexxObject *)
 
RexxClassclassObject ()
 
RexxObjectsetMethod (RexxString *, RexxMethod *, RexxString *a=OREF_NULL)
 
RexxObjectunsetMethod (RexxString *)
 
RexxObjectrequestRexx (RexxString *)
 
RexxMessagestart (RexxObject **, size_t, size_t)
 
RexxMessagestartWith (RexxObject *, RexxArray *, RexxObject **, size_t)
 
RexxObjectsend (RexxObject **, size_t, size_t)
 
RexxObjectsendWith (RexxObject *, RexxArray *, RexxObject **, size_t)
 
RexxMessagestartCommon (RexxObject *message, RexxObject **arguments, size_t argCount, size_t named_argCount)
 
RexxStringoref ()
 
RexxObjectpmdict ()
 
RexxObjectrun (RexxObject **, size_t, size_t)
 
bool messageSend (RexxString *, RexxObject **, size_t, size_t, ProtectedObject &, bool processUnknown=true, bool dynamicTarget=true)
 
bool messageSend (RexxString *, RexxObject **, size_t, size_t, RexxObject *, ProtectedObject &, bool processUnknown=true, bool dynamicTarget=true)
 
RexxMethodcheckPrivate (RexxMethod *, RexxErrorCodes &)
 
RexxMethodcheckPackage (RexxMethod *, RexxErrorCodes &)
 
void processUnknown (RexxErrorCodes, RexxString *, RexxObject **, size_t, size_t, ProtectedObject &)
 
void processProtectedMethod (RexxString *, RexxMethod *, RexxObject **, size_t, size_t, ProtectedObject &)
 
void sendMessage (RexxString *, RexxArray *, RexxDirectory *, ProtectedObject &)
 
void sendMessage (RexxString *message, RexxObject **args, size_t argCount, size_t named_argCount, ProtectedObject &result)
 
void sendMessage (RexxString *message, ProtectedObject &result)
 
void sendMessage (RexxString *message, RexxObject *argument1, ProtectedObject &result)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, ProtectedObject &)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, ProtectedObject &)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, ProtectedObject &)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, ProtectedObject &)
 
RexxObjectsendMessage (RexxString *, RexxArray *, RexxDirectory *=OREF_NULL)
 
RexxObjectsendMessage (RexxString *message, RexxObject **args, size_t argCount, size_t named_argCount)
 
RexxObjectsendMessage (RexxString *message)
 
RexxObjectsendMessage (RexxString *message, RexxObject *argument1)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, RexxObject *)
 
RexxObjectdefMethods (RexxDirectory *)
 
void setObjectVariable (RexxString *, RexxObject *, RexxObject *)
 
RexxObjectgetObjectVariable (RexxString *)
 
RexxObjectgetObjectVariable (RexxString *, RexxObject *)
 
void addObjectVariables (RexxVariableDictionary *)
 
void copyObjectVariables (RexxObject *newObject)
 
RexxObjectsuperScope (RexxObject *)
 
RexxMethodsuperMethod (RexxString *, RexxObject *)
 
RexxObjectmdict ()
 
RexxObjectsetMdict (RexxObject *)
 
RexxBehaviourbehaviourObject ()
 
const char * idString ()
 
RexxStringid ()
 
RexxMethodmethodLookup (RexxString *name)
 
RexxVariableDictionarygetObjectVariables (RexxObject *)
 
void guardOn (RexxActivity *activity, RexxObject *scope)
 
void guardOff (RexxActivity *activity, RexxObject *scope)
 
RexxObjectequal (RexxObject *)
 
RexxObjectnotEqual (RexxObject *other)
 
RexxObjectstrictEqual (RexxObject *)
 
RexxObjectstrictNotEqual (RexxObject *other)
 
RexxIntegeridentityHashRexx ()
 
RexxObjecthashCode ()
 
RexxStringstringRexx ()
 
RexxStringconcatRexx (RexxObject *)
 
RexxStringconcatBlank (RexxObject *)
 
RexxObjectmakeStringRexx ()
 
RexxObjectmakeArrayRexx ()
 
RexxStringdefaultNameRexx ()
 
RexxObjectcopyRexx ()
 
RexxObjectunknownRexx (RexxString *, RexxArray *, RexxObject **, size_t)
 
RexxObjecthasMethodRexx (RexxString *)
 
void * getCSelf ()
 
void * getCSelf (RexxObject *scope)
 
bool equalValue (RexxObject *other)
 
 koper (operator_plus) koper(operator_minus) koper(operator_multiply) koper(operator_divide) koper(operator_integerDivide) koper(operator_remainder) koper(operator_power) koper(operator_abuttal) koper(operator_concat) koper(operator_concatBlank) koper(operator_equal) koper(operator_notEqual) koper(operator_isGreaterThan) koper(operator_isBackslashGreaterThan) koper(operator_isLessThan) koper(operator_isBackslashLessThan) koper(operator_isGreaterOrEqual) koper(operator_isLessOrEqual) koper(operator_strictEqual) koper(operator_strictNotEqual) koper(operator_strictGreaterThan) koper(operator_strictBackslashGreaterThan) koper(operator_strictLessThan) koper(operator_strictBackslashLessThan) koper(operator_strictGreaterOrEqual) koper(operator_strictLessOrEqual) koper(operator_lessThanGreaterThan) koper(operator_greaterThanLessThan) koper(operator_and) koper(operator_or) koper(operator_xor) koper(operator_not) RexxVariableDictionary *objectVariables
 
- Public Member Functions inherited from RexxInternalObject
void * operator new (size_t, RexxClass *)
 
void * operator new (size_t, RexxClass *, RexxObject **, size_t, size_t)
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *)
 
void operator delete (void *p, void *ptr)
 
 RexxInternalObject ()
 
 RexxInternalObject (RESTORETYPE restoreType)
 
virtual ~RexxInternalObject ()
 
 operator RexxObject * ()
 
size_t getObjectSize ()
 
void setObjectSize (size_t s)
 
size_t getObjectDataSize ()
 
void * getObjectDataSpace ()
 
void clearObject ()
 
void clearObject (size_t l)
 
void setVirtualFunctions (void *t)
 
void setInitHeader (size_t s, size_t markword)
 
void setInitHeader (size_t markword)
 
void setObjectLive (size_t markword)
 
void setHasReferences ()
 
void setHasNoReferences ()
 
bool hasReferences ()
 
bool hasNoReferences ()
 
void setPrimitive ()
 
void setNonPrimitive ()
 
bool isPrimitive ()
 
bool isNonPrimitive ()
 
void setInRexxPackage ()
 
bool isInRexxPackage ()
 
bool isObjectMarked (size_t markword)
 
void setObjectMark (size_t markword)
 
void clearObjectMark ()
 
bool isObjectLive (size_t mark)
 
bool isObjectDead (size_t mark)
 
bool isOldSpace ()
 
bool isNewSpace ()
 
void setNewSpace ()
 
void setOldSpace ()
 
void makeProxiedObject ()
 
bool isProxyObject ()
 
bool isSubClassOrEnhanced ()
 
bool isBaseClass ()
 
size_t getObjectTypeNumber ()
 
RexxBehaviourgetObjectType ()
 
bool isObjectType (RexxBehaviour *b)
 
bool isObjectType (size_t t)
 
bool isSameType (RexxInternalObject *o)
 
void setBehaviour (RexxBehaviour *b)
 
virtual RexxObjectmakeProxy (RexxEnvelope *)
 
HashCode identityHash ()
 
virtual RexxTextprimitiveMakeText ()
 
virtual RexxObjectdynamicTarget (RexxObject **arguments, size_t count, size_t named_count)
 
void hasUninit ()
 
void removedUninit ()
 
void printObject ()
 
RexxObjectclone ()
 
- Public Member Functions inherited from RexxVirtualBase
virtual RexxObjectunflatten (RexxEnvelope *)
 

Static Public Member Functions

static RexxNumberStringnewInstanceFromDouble (double)
 
static RexxNumberStringnewInstanceFromDouble (double, size_t)
 
static RexxNumberStringnewInstanceFromFloat (float)
 
static RexxNumberStringnewInstanceFromWholenumber (wholenumber_t)
 
static RexxNumberStringnewInstanceFromInt64 (int64_t)
 
static RexxNumberStringnewInstanceFromUint64 (uint64_t)
 
static RexxNumberStringnewInstanceFromStringsize (stringsize_t)
 
static RexxNumberStringnewInstance (const char *, stringsize_t)
 
static void createInstance ()
 
static size_t highBits (size_t)
 
static void subtractNumbers (RexxNumberString *larger, const char *largerPtr, wholenumber_t aLargerExp, RexxNumberString *smaller, const char *smallerPtr, wholenumber_t aSmallerExp, RexxNumberString *result, char **resultPtr)
 
static char * addMultiplier (char *, size_t, char *, int)
 
static char * subtractDivisor (char *data1, size_t length1, char *data2, size_t length2, char *result, int Mult)
 
static char * multiplyPower (char *leftPtr, RexxNumberStringBase *left, char *rightPtr, RexxNumberStringBase *right, char *OutPtr, size_t OutLen, size_t NumberDigits)
 
static char * dividePower (char *AccumPtr, RexxNumberStringBase *Accum, char *Output, size_t NumberDigits)
 
static char * addToBaseSixteen (int, char *, char *)
 
static char * addToBaseTen (int, char *, char *)
 
static char * multiplyBaseSixteen (char *, char *)
 
static char * multiplyBaseTen (char *, char *)
 
- Static Public Member Functions inherited from RexxObject
static void decodeMessageName (RexxObject *target, RexxObject *message, RexxString *&messageName, RexxObject *&startScope)
 
static void createInstance ()
 
- Static Public Member Functions inherited from RexxInternalObject
static size_t getObjectHeaderSize ()
 

Public Attributes

char number [4]
 
- Public Attributes inherited from RexxNumberStringBase
RexxStringstringObject
 
short NumFlags
 
short sign
 
size_t NumDigits
 
wholenumber_t exp
 
size_t length
 
- Public Attributes inherited from RexxInternalObject
ObjectHeader header
 
RexxBehaviourbehaviour
 

Static Public Attributes

static PCPPM operatorMethods []
 
static RexxClassclassInstance = OREF_NULL
 
- Static Public Attributes inherited from RexxObject
static PCPPM operatorMethods []
 
static RexxClassclassInstance = OREF_NULL
 

Additional Inherited Members

- Protected Member Functions inherited from RexxVirtualBase
virtual ~RexxVirtualBase ()
 
virtual void baseVirtual ()
 

Detailed Description

Definition at line 93 of file NumberStringClass.hpp.

Constructor & Destructor Documentation

◆ RexxNumberString() [1/3]

RexxNumberString::RexxNumberString ( size_t  len)

Constructor for a new number string value.

Parameters
lenThe length we require for the value.

Definition at line 86 of file NumberStringClass.cpp.

References Numerics::FORM_SCIENTIFIC, RexxNumberStringBase::length, number_digits(), number_form(), RexxNumberStringBase::NumDigits, RexxNumberStringBase::NumFlags, NumFormScientific, and RexxNumberStringBase::sign.

Referenced by addSub().

◆ RexxNumberString() [2/3]

RexxNumberString::RexxNumberString ( size_t  len,
size_t  precision 
)

Create a number string for a given digits precision

Parameters
lenThe length of value we need to accomodate
precisionThe precision to be used for formatting.

Definition at line 104 of file NumberStringClass.cpp.

References Numerics::FORM_SCIENTIFIC, RexxNumberStringBase::length, number_form(), RexxNumberStringBase::NumDigits, RexxNumberStringBase::NumFlags, NumFormScientific, and RexxNumberStringBase::sign.

◆ RexxNumberString() [3/3]

RexxNumberString::RexxNumberString ( RESTORETYPE  restoreType)
inline

Definition at line 104 of file NumberStringClass.hpp.

Member Function Documentation

◆ abs()

RexxNumberString * RexxNumberString::abs ( void  )

◆ addMultiplier()

char * RexxNumberString::addMultiplier ( char *  top,
size_t  topLen,
char *  AccumPtr,
int  MultChar 
)
static

Definition at line 58 of file NumberStringMath2.cpp.

Referenced by Multiply(), and multiplyPower().

◆ addSub()

◆ addToBaseSixteen()

char * RexxNumberString::addToBaseSixteen ( int  Digit,
char *  Value,
char *  HighDigit 
)
static

Definition at line 1120 of file NumberStringMath.cpp.

Referenced by d2xD2c().

◆ addToBaseTen()

char * RexxNumberString::addToBaseTen ( int  Digit,
char *  Accum,
char *  HighDigit 
)
static

Definition at line 1190 of file NumberStringMath.cpp.

Referenced by RexxString::x2dC2d().

◆ adjustPrecision() [1/2]

◆ adjustPrecision() [2/2]

◆ andOp()

RexxObject * RexxNumberString::andOp ( RexxObject operand)

Definition at line 2742 of file NumberStringClass.cpp.

References RexxString::andOp(), and stringValue().

Referenced by RexxMemory::createImage().

◆ ceiling()

RexxObject * RexxNumberString::ceiling ( )

Return the ceiling value for a decimal numeric value. The ceiling is the first full number value greater that the current value. If the number has no significant decimal positions, this returns the same value (minus any trailing decimal zeros). NOTE: If the number is negative, the value goes toward the higher number (e.g., the ceiling of -3.5 is -3, not -4).

Returns
The numeric ceiling of this value.

Definition at line 1617 of file NumberStringClass.cpp.

References ceilingInternal(), number_digits(), prepareNumber(), and ROUND.

Referenced by RexxString::ceiling(), and RexxMemory::createImage().

◆ ceilingInternal()

RexxObject * RexxNumberString::ceilingInternal ( )

Calculate the ceiling value for a number.

Returns
A string value of the ceiling, with appropriate formatting for the function.

Definition at line 1629 of file NumberStringClass.cpp.

References RexxNumberStringBase::exp, IntegerOne, IntegerZero, RexxNumberStringBase::length, Numerics::minVal(), number, RexxNumberStringBase::sign, and truncInternal().

Referenced by ceiling().

◆ checkIntegerDigits()

bool RexxNumberString::checkIntegerDigits ( stringsize_t  numDigits,
stringsize_t numberLength,
wholenumber_t numberExponent,
bool &  carry 
)

◆ checkNumber()

RexxNumberString* RexxNumberString::checkNumber ( size_t  digits)
inline

Definition at line 168 of file NumberStringClass.hpp.

References RexxNumberStringBase::length, NOROUND, and prepareOperatorNumber().

Referenced by Division(), and Multiply().

◆ checkPrecision()

void RexxNumberString::checkPrecision ( )
inline

◆ classObject()

RexxClass * RexxNumberString::classObject ( )

Definition at line 3726 of file NumberStringClass.cpp.

References TheStringClass.

Referenced by RexxMemory::createImage().

◆ clone()

◆ comp()

◆ compareTo()

wholenumber_t RexxNumberString::compareTo ( RexxObject other)
virtual

Wrapper around the compareTo() method that does string sort comparisons.

Parameters
otherThe other comparison object
Returns
-1, 0, 1 depending on the comparison result.

Reimplemented from RexxObject.

Definition at line 2667 of file NumberStringClass.cpp.

References RexxString::compareTo(), and stringValue().

◆ concat()

RexxString * RexxNumberString::concat ( RexxObject other)

Definition at line 2727 of file NumberStringClass.cpp.

References RexxString::concatRexx(), and stringValue().

◆ concatBlank()

RexxString * RexxNumberString::concatBlank ( RexxObject other)

Definition at line 2719 of file NumberStringClass.cpp.

References RexxString::concatBlank(), and stringValue().

◆ createInstance()

void RexxNumberString::createInstance ( )
static

Create initial class object at bootstrap time.

Definition at line 67 of file NumberStringClass.cpp.

References CLASS_CREATE.

Referenced by RexxMemory::createImage().

◆ createUnsignedInt64Value()

bool RexxNumberString::createUnsignedInt64Value ( const char *  thisnum,
stringsize_t  intlength,
int  carry,
wholenumber_t  exponent,
uint64_t  maxValue,
uint64_t result 
)

Definition at line 782 of file NumberStringClass.cpp.

References Numerics::DIGITS64.

Referenced by int64Value(), and unsignedInt64Value().

◆ createUnsignedValue()

bool RexxNumberString::createUnsignedValue ( const char *  thisnum,
stringsize_t  intlength,
int  carry,
wholenumber_t  exponent,
uwholenumber_t  maxValue,
uwholenumber_t result 
)

Definition at line 708 of file NumberStringClass.cpp.

References Numerics::ARGUMENT_DIGITS.

Referenced by numberValue(), and unsignedNumberValue().

◆ d2c()

RexxString * RexxNumberString::d2c ( RexxObject _length)

Definition at line 3440 of file NumberStringClass.cpp.

References d2xD2c().

Referenced by RexxMemory::createImage().

◆ d2x()

RexxString * RexxNumberString::d2x ( RexxObject _length)

Definition at line 3430 of file NumberStringClass.cpp.

References d2xD2c().

Referenced by RexxMemory::createImage().

◆ d2xD2c()

◆ divide()

◆ dividePower()

char * RexxNumberString::dividePower ( char *  AccumPtr,
RexxNumberStringBase Accum,
char *  Output,
size_t  NumberDigits 
)
static

◆ Division()

◆ doubleValue()

bool RexxNumberString::doubleValue ( double &  result)
virtual

Reimplemented from RexxObject.

Definition at line 673 of file NumberStringClass.cpp.

References RexxString::getStringData(), and stringValue().

Referenced by RexxString::doubleValue().

◆ equal()

RexxInteger * RexxNumberString::equal ( RexxObject other)

Definition at line 2948 of file NumberStringClass.cpp.

References comp(), OREF_NULL, TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ evaluate()

RexxObject * RexxNumberString::evaluate ( RexxActivation context,
RexxExpressionStack stack 
)
virtual

◆ flatten()

void RexxNumberString::flatten ( RexxEnvelope envelope)
virtual

Reimplemented from RexxObject.

Definition at line 158 of file NumberStringClass.cpp.

References cleanUpFlatten, flatten_reference, and setUpFlatten.

◆ floor()

RexxObject * RexxNumberString::floor ( )

Return the floor value for a decimal numeric value. The floor is the first full number value less that the current value. If the number has no significant decimal positions, this returns the same value (minus any trailing decimal zeros). NOTE: If the number is negative, the value goes toward the lower number (e.g., the floor of -3.5 is -4, not -3).

Returns
The numeric floor of this value.

Definition at line 1488 of file NumberStringClass.cpp.

References floorInternal(), number_digits(), prepareNumber(), and ROUND.

Referenced by RexxMemory::createImage(), and RexxString::floor().

◆ floorInternal()

RexxObject * RexxNumberString::floorInternal ( )

Calculate the floor value for a number.

Returns
A string value of the floor, with appropriate formatting for the function.

Definition at line 1500 of file NumberStringClass.cpp.

References RexxNumberStringBase::exp, IntegerMinusOne, IntegerZero, RexxNumberStringBase::length, Numerics::minVal(), number, RexxNumberStringBase::sign, and truncInternal().

Referenced by floor().

◆ format()

◆ formatInt64()

void RexxNumberString::formatInt64 ( int64_t  integer)

◆ formatInternal()

◆ formatNumber()

void RexxNumberString::formatNumber ( wholenumber_t  integer)

◆ formatRexx()

RexxString * RexxNumberString::formatRexx ( RexxObject Integers,
RexxObject Decimals,
RexxObject MathExp,
RexxObject ExpTrigger 
)

◆ formatUnsignedInt64()

void RexxNumberString::formatUnsignedInt64 ( uint64_t  integer)

Definition at line 2614 of file NumberStringClass.cpp.

References integer(), RexxNumberStringBase::length, number, and setZero().

Referenced by newInstanceFromUint64().

◆ formatUnsignedNumber()

void RexxNumberString::formatUnsignedNumber ( size_t  integer)

◆ getHashValue()

HashCode RexxNumberString::getHashValue ( )
virtual

Get the primitive hash value of this String object.

Returns
The calculated string hash for the string.

Reimplemented from RexxInternalObject.

Definition at line 135 of file NumberStringClass.cpp.

References RexxString::getHashValue(), and stringValue().

◆ getRealValue() [1/2]

RexxObject * RexxNumberString::getRealValue ( RexxActivation context)
virtual

Reimplemented from RexxInternalObject.

Definition at line 3707 of file NumberStringClass.cpp.

◆ getRealValue() [2/2]

RexxObject * RexxNumberString::getRealValue ( RexxVariableDictionary context)
virtual

Reimplemented from RexxInternalObject.

Definition at line 3717 of file NumberStringClass.cpp.

◆ getValue() [1/2]

RexxObject * RexxNumberString::getValue ( RexxActivation context)
virtual

Reimplemented from RexxInternalObject.

Definition at line 3687 of file NumberStringClass.cpp.

◆ getValue() [2/2]

RexxObject * RexxNumberString::getValue ( RexxVariableDictionary dictionary)
virtual

Reimplemented from RexxInternalObject.

Definition at line 3697 of file NumberStringClass.cpp.

◆ hashCode()

RexxObject * RexxNumberString::hashCode ( )

Exported version of the HASHCODE method for retrieving the object's hash.

Returns
A string version of the hash (generally holds binary characters).

Definition at line 3051 of file NumberStringClass.cpp.

References RexxObject::hash(), and new_string().

Referenced by RexxMemory::createImage().

◆ hasMethod()

RexxInteger * RexxNumberString::hasMethod ( RexxString methodName)
virtual

Reimplemented from RexxObject.

Definition at line 201 of file NumberStringClass.cpp.

References RexxObject::hasMethod(), and stringValue().

◆ highBits()

size_t RexxNumberString::highBits ( size_t  number)
static

Definition at line 250 of file NumberStringMath.cpp.

References HIBIT, LONGBITS, and number.

Referenced by power().

◆ instanceMethod()

RexxMethod * RexxNumberString::instanceMethod ( RexxString method_name)
virtual

Retrieve the method instance for an object's defined method.

Parameters
method_nameThe method name.
Returns
The method object that implements the object method.

Reimplemented from RexxObject.

Definition at line 2696 of file NumberStringClass.cpp.

References RexxObject::instanceMethod(), and stringValue().

◆ instanceMethods()

RexxSupplier * RexxNumberString::instanceMethods ( RexxClass class_object)
virtual

Return a supplier containing the methods implemented by an object. Depending on the argument, this is either A) all of the methods, B) just the explicitly set instance methods, or C) the methods provided by a given class.

Parameters
class_objectThe target class object (optional).
Returns
A supplier with the appropriate method set.

Reimplemented from RexxObject.

Definition at line 2713 of file NumberStringClass.cpp.

References RexxObject::instanceMethods(), and stringValue().

◆ int64Value()

◆ integerDivide()

◆ integerValue()

RexxInteger * RexxNumberString::integerValue ( size_t  digits)
virtual

Reimplemented from RexxObject.

Definition at line 687 of file NumberStringClass.cpp.

References new_integer(), number_digits(), numberValue(), and TheNilObject.

Referenced by RexxString::integerValue().

◆ isEqual()

◆ isGreaterOrEqual()

RexxInteger * RexxNumberString::isGreaterOrEqual ( RexxObject other)

Definition at line 3012 of file NumberStringClass.cpp.

References comp(), OREF_NULL, TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ isGreaterThan()

RexxInteger * RexxNumberString::isGreaterThan ( RexxObject other)

Definition at line 2980 of file NumberStringClass.cpp.

References comp(), OREF_NULL, TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage(), and maxMin().

◆ isInstanceOf()

bool RexxNumberString::isInstanceOf ( RexxClass other)
virtual

Override for the normal isinstanceof method. This version allows the NumberStringClass to "lie" about being a string.

Parameters
otherThe comparison class
Returns
True if the string value is an instance of the target class.

Reimplemented from RexxObject.

Definition at line 2682 of file NumberStringClass.cpp.

References RexxObject::isInstanceOf(), and stringValue().

◆ isInteger()

RexxObject * RexxNumberString::isInteger ( )

Definition at line 3375 of file NumberStringClass.cpp.

References RexxString::isInteger(), and stringValue().

Referenced by StringUtil::dataType().

◆ isLessOrEqual()

RexxInteger * RexxNumberString::isLessOrEqual ( RexxObject other)

Definition at line 3028 of file NumberStringClass.cpp.

References comp(), OREF_NULL, TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ isLessThan()

RexxInteger * RexxNumberString::isLessThan ( RexxObject other)

Definition at line 2996 of file NumberStringClass.cpp.

References comp(), OREF_NULL, TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage(), and maxMin().

◆ live()

void RexxNumberString::live ( size_t  liveMark)
virtual

Reimplemented from RexxObject.

Definition at line 140 of file NumberStringClass.cpp.

References memory_mark, and RexxNumberStringBase::stringObject.

◆ liveGeneral()

void RexxNumberString::liveGeneral ( int  reason)
virtual

Reimplemented from RexxObject.

Definition at line 149 of file NumberStringClass.cpp.

References memory_mark_general, and RexxNumberStringBase::stringObject.

◆ logicalValue()

bool RexxNumberString::logicalValue ( logical_t result)
virtual

Convert an object to a logical value without raising an error.

Parameters
resultThe converted value.
Returns
true if this converted ok, false for an invalid logical.

Reimplemented from RexxObject.

Definition at line 1129 of file NumberStringClass.cpp.

References RexxNumberStringBase::exp, RexxNumberStringBase::length, number, and RexxNumberStringBase::sign.

◆ makeArray()

RexxArray * RexxNumberString::makeArray ( void  )
virtual

Override for the default object makearray method.

Returns
The results of our string representation's makearray.

Reimplemented from RexxObject.

Definition at line 196 of file NumberStringClass.cpp.

References RexxString::makeArray(), and stringValue().

◆ makeString()

RexxString * RexxNumberString::makeString ( )
virtual

Reimplemented from RexxObject.

Definition at line 182 of file NumberStringClass.cpp.

References stringValue().

◆ Max()

RexxNumberString * RexxNumberString::Max ( RexxObject **  args,
size_t  argCount,
size_t  named_argCount 
)

Definition at line 3353 of file NumberStringClass.cpp.

References maxMin(), and OT_MAX.

Referenced by RexxMemory::createImage(), RexxInteger::Max(), and RexxString::Max().

◆ maxMin()

◆ Min()

RexxNumberString * RexxNumberString::Min ( RexxObject **  args,
size_t  argCount,
size_t  named_argCount 
)

Definition at line 3364 of file NumberStringClass.cpp.

References maxMin(), and OT_MIN.

Referenced by RexxMemory::createImage(), RexxInteger::Min(), and RexxString::Min().

◆ minus()

◆ Multiply()

◆ multiply()

◆ multiplyBaseSixteen()

char * RexxNumberString::multiplyBaseSixteen ( char *  Accum,
char *  HighDigit 
)
static

Definition at line 1154 of file NumberStringMath.cpp.

Referenced by d2xD2c().

◆ multiplyBaseTen()

char * RexxNumberString::multiplyBaseTen ( char *  Accum,
char *  HighDigit 
)
static

Definition at line 1228 of file NumberStringMath.cpp.

Referenced by RexxString::x2dC2d().

◆ multiplyPower()

char * RexxNumberString::multiplyPower ( char *  leftPtr,
RexxNumberStringBase left,
char *  rightPtr,
RexxNumberStringBase right,
char *  OutPtr,
size_t  OutLen,
size_t  NumberDigits 
)
static

◆ newInstance()

RexxNumberString * RexxNumberString::newInstance ( const char *  number,
stringsize_t  len 
)
static

Definition at line 3746 of file NumberStringClass.cpp.

References format(), number, numberStringScan(), OREF_NULL, and setZero().

Referenced by new_numberstring().

◆ newInstanceFromDouble() [1/2]

RexxNumberString * RexxNumberString::newInstanceFromDouble ( double  number)
static

Definition at line 3794 of file NumberStringClass.cpp.

References number, and number_digits().

Referenced by new_numberstringFromDouble(), and newInstanceFromFloat().

◆ newInstanceFromDouble() [2/2]

RexxNumberString * RexxNumberString::newInstanceFromDouble ( double  number,
size_t  precision 
)
static

Create a numberstring from a double value using a given formatting precision.

Parameters
numberThe double number to convert
precisionThe precision to apply to the result.
Returns
The formatted number, as a numberstring value.

Definition at line 3812 of file NumberStringClass.cpp.

References format(), isnan, new_string(), number, prepareNumber(), and ROUND.

◆ newInstanceFromFloat()

RexxNumberString * RexxNumberString::newInstanceFromFloat ( float  num)
static

Definition at line 3786 of file NumberStringClass.cpp.

References newInstanceFromDouble(), and number_digits().

Referenced by new_numberstringFromFloat().

◆ newInstanceFromInt64()

RexxNumberString * RexxNumberString::newInstanceFromInt64 ( int64_t  integer)
static

Definition at line 3869 of file NumberStringClass.cpp.

References Numerics::DIGITS64, formatInt64(), and integer().

Referenced by new_numberstringFromInt64().

◆ newInstanceFromStringsize()

RexxNumberString * RexxNumberString::newInstanceFromStringsize ( stringsize_t  integer)
static

◆ newInstanceFromUint64()

RexxNumberString * RexxNumberString::newInstanceFromUint64 ( uint64_t  integer)
static

Definition at line 3881 of file NumberStringClass.cpp.

References Numerics::DIGITS64, formatUnsignedInt64(), and integer().

Referenced by new_numberstringFromUint64().

◆ newInstanceFromWholenumber()

RexxNumberString * RexxNumberString::newInstanceFromWholenumber ( wholenumber_t  integer)
static

◆ notEqual()

RexxInteger * RexxNumberString::notEqual ( RexxObject other)

Definition at line 2964 of file NumberStringClass.cpp.

References comp(), OREF_NULL, TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ notOp()

RexxObject * RexxNumberString::notOp ( )

Definition at line 3337 of file NumberStringClass.cpp.

References RexxString::notOp(), and stringValue().

Referenced by RexxMemory::createImage().

◆ numberString()

RexxNumberString* RexxNumberString::numberString ( )
inlinevirtual

Reimplemented from RexxObject.

Definition at line 115 of file NumberStringClass.hpp.

◆ numberValue() [1/2]

bool RexxNumberString::numberValue ( wholenumber_t result)
virtual

Reimplemented from RexxObject.

Definition at line 504 of file NumberStringClass.cpp.

References Numerics::DEFAULT_DIGITS, and numberValue().

◆ numberValue() [2/2]

bool RexxNumberString::numberValue ( wholenumber_t result,
size_t  precision 
)
virtual

◆ operator delete() [1/3]

void RexxNumberString::operator delete ( void *  )
inline

Definition at line 97 of file NumberStringClass.hpp.

◆ operator delete() [2/3]

void RexxNumberString::operator delete ( void *  ,
size_t   
)
inline

Definition at line 98 of file NumberStringClass.hpp.

◆ operator delete() [3/3]

void RexxNumberString::operator delete ( void *  ,
void *   
)
inline

Definition at line 99 of file NumberStringClass.hpp.

◆ operator new() [1/2]

void* RexxNumberString::operator new ( size_t  size,
void *  ptr 
)
inline

Definition at line 96 of file NumberStringClass.hpp.

◆ operator new() [2/2]

void * RexxNumberString::operator new ( size_t  size,
size_t  length 
)

◆ operatorNot()

RexxObject * RexxNumberString::operatorNot ( RexxObject right)

Definition at line 3345 of file NumberStringClass.cpp.

References RexxString::notOp(), and stringValue().

◆ orOp()

RexxObject * RexxNumberString::orOp ( RexxObject operand)

Definition at line 2737 of file NumberStringClass.cpp.

References RexxString::orOp(), and stringValue().

Referenced by RexxMemory::createImage().

◆ plus()

◆ power()

◆ prepareNumber()

RexxNumberString * RexxNumberString::prepareNumber ( size_t  NumberDigits,
bool  rounding 
)

◆ prepareOperatorNumber()

RexxNumberString * RexxNumberString::prepareOperatorNumber ( size_t  targetLength,
size_t  numberDigits,
bool  rounding 
)

Prepare an operator numberstring to a given length, raising a LOSTDIGITS condition if the starting number will cause lost digits

Parameters
targetLengthThe target preparation length (>= numberDigits)
numberDigitsThe digits setting used to determine LOSTDIGITS conditions
roundingInidicates whether rounding is to be performed if the target object is longer than the targetLength
Returns
A new number object no longer than the target length.

Definition at line 433 of file NumberStringMath.cpp.

References clone(), RexxNumberStringBase::length, RexxString::length, number_form(), reportCondition(), ROUND, and setNumericSettings().

Referenced by checkNumber(), Division(), maxMin(), minus(), plus(), and power().

◆ primitiveMakeString()

RexxString * RexxNumberString::primitiveMakeString ( )
virtual

Reimplemented from RexxInternalObject.

Definition at line 210 of file NumberStringClass.cpp.

References OREF_NULL, RexxNumberStringBase::stringObject, and stringValue().

◆ remainder()

◆ round()

RexxObject * RexxNumberString::round ( )

Round the number value depending on the value of the first decimal position using standard rounding rules. NOTE: this uses the same rules for floor and ceiling when determining how things are rounded. This is really defined as floor(number + .5). Thus 3.4 and -3.4 round to 3 and -3, since they end up calculating floor(3.9) and floor(-2.9), repectively.

Returns
The rounded value

Definition at line 1745 of file NumberStringClass.cpp.

References number_digits(), prepareNumber(), ROUND, and roundInternal().

Referenced by RexxMemory::createImage(), and RexxString::round().

◆ roundInternal()

RexxObject * RexxNumberString::roundInternal ( )

Calculate the rounded number value.

Returns
A string value of the rounded number.

Definition at line 1756 of file NumberStringClass.cpp.

References RexxNumberStringBase::exp, IntegerZero, RexxNumberStringBase::length, number, RexxNumberStringBase::sign, and truncInternal().

Referenced by round().

◆ roundUp()

void RexxNumberString::roundUp ( int  MSDigit)

Definition at line 3391 of file NumberStringClass.cpp.

References ch_FIVE, ch_NINE, RexxNumberStringBase::exp, RexxNumberStringBase::length, and number.

Referenced by format().

◆ setNumericSettings()

void RexxNumberString::setNumericSettings ( size_t  digits,
bool  form 
)
inline

◆ setString()

void RexxNumberString::setString ( RexxString stringObj)

◆ setupNumber()

void RexxNumberString::setupNumber ( )
inline

Definition at line 193 of file NumberStringClass.hpp.

References checkPrecision(), number_digits(), number_form(), and setNumericSettings().

Referenced by abs(), addSub(), Division(), and Sign().

◆ setZero()

◆ Sign()

RexxInteger * RexxNumberString::Sign ( )

◆ strictComp()

◆ strictEqual()

RexxInteger * RexxNumberString::strictEqual ( RexxObject other)

Definition at line 3058 of file NumberStringClass.cpp.

References strictComp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ strictGreaterOrEqual()

RexxInteger * RexxNumberString::strictGreaterOrEqual ( RexxObject other)

Definition at line 3108 of file NumberStringClass.cpp.

References strictComp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ strictGreaterThan()

RexxInteger * RexxNumberString::strictGreaterThan ( RexxObject other)

Definition at line 3084 of file NumberStringClass.cpp.

References strictComp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ strictLessOrEqual()

RexxInteger * RexxNumberString::strictLessOrEqual ( RexxObject other)

Definition at line 3120 of file NumberStringClass.cpp.

References strictComp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ strictLessThan()

RexxInteger * RexxNumberString::strictLessThan ( RexxObject other)

Definition at line 3096 of file NumberStringClass.cpp.

References strictComp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ strictNotEqual()

RexxInteger * RexxNumberString::strictNotEqual ( RexxObject other)

Definition at line 3071 of file NumberStringClass.cpp.

References strictComp(), TheFalseObject, TheNilObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ stringValue()

◆ subtractDivisor()

char * RexxNumberString::subtractDivisor ( char *  data1,
size_t  length1,
char *  data2,
size_t  length2,
char *  result,
int  Mult 
)
static

Definition at line 204 of file NumberStringMath2.cpp.

Referenced by dividePower(), and Division().

◆ subtractNumbers()

void RexxNumberString::subtractNumbers ( RexxNumberString larger,
const char *  largerPtr,
wholenumber_t  aLargerExp,
RexxNumberString smaller,
const char *  smallerPtr,
wholenumber_t  aSmallerExp,
RexxNumberString result,
char **  resultPtr 
)
static

Definition at line 970 of file NumberStringMath.cpp.

References RexxNumberStringBase::length, and number.

Referenced by addSub().

◆ trunc()

RexxObject * RexxNumberString::trunc ( RexxObject decimal_digits)

◆ truncInternal()

◆ truthValue()

bool RexxNumberString::truthValue ( int  errorcode)
virtual

◆ unknown()

RexxObject * RexxNumberString::unknown ( RexxString msgname,
RexxArray arguments,
RexxDirectory named_arguments 
)
virtual

Reimplemented from RexxObject.

Definition at line 2648 of file NumberStringClass.cpp.

References RexxObject::sendMessage(), and stringValue().

◆ unsignedInt64Value()

◆ unsignedNumberValue() [1/2]

bool RexxNumberString::unsignedNumberValue ( uwholenumber_t result)
virtual

Reimplemented from RexxObject.

Definition at line 513 of file NumberStringClass.cpp.

References Numerics::DEFAULT_DIGITS, and unsignedNumberValue().

◆ unsignedNumberValue() [2/2]

bool RexxNumberString::unsignedNumberValue ( uwholenumber_t result,
size_t  precision 
)
virtual

◆ xorOp()

RexxObject * RexxNumberString::xorOp ( RexxObject operand)

Definition at line 2747 of file NumberStringClass.cpp.

References stringValue(), and RexxString::xorOp().

Referenced by RexxMemory::createImage().

Member Data Documentation

◆ classInstance

RexxClass * RexxNumberString::classInstance = OREF_NULL
static

Definition at line 256 of file NumberStringClass.hpp.

◆ number

◆ operatorMethods

PCPPM RexxNumberString::operatorMethods
static

Definition at line 243 of file NumberStringClass.hpp.


The documentation for this class was generated from the following files: