ObjectClass.cpp File Reference
#include <ctype.h>
#include <string.h>
#include "RexxCore.h"
#include "ObjectClass.hpp"
#include "StringClass.hpp"
#include "BufferClass.hpp"
#include "RexxSmartBuffer.hpp"
#include "DirectoryClass.hpp"
#include "RexxVariableDictionary.hpp"
#include "ArrayClass.hpp"
#include "RexxActivity.hpp"
#include "RexxActivation.hpp"
#include "MessageClass.hpp"
#include "MethodClass.hpp"
#include "ExpressionBaseVariable.hpp"
#include "SourceFile.hpp"
#include "ProtectedObject.hpp"
#include "PointerClass.hpp"
#include "TextClass.hpp"
#include "PackageClass.hpp"
Include dependency graph for ObjectClass.cpp:

Go to the source code of this file.

Macros

#define operatorMethod(name, message)
 
#define prefixOperatorMethod(name, message)
 

Functions

 prefixOperatorMethod (operator_plus, PLUS) prefixOperatorMethod(operator_minus
 
SUBTRACT operatorMethod (operator_multiply, MULTIPLY) operatorMethod(operator_divide
 
SUBTRACT DIVIDE operatorMethod (operator_integerDivide, INTDIV) operatorMethod(operator_remainder
 
SUBTRACT DIVIDE REMAINDER operatorMethod (operator_power, POWER) operatorMethod(operator_abuttal
 
SUBTRACT DIVIDE REMAINDER NULLSTRING operatorMethod (operator_concat, CONCATENATE) operatorMethod(operator_concatBlank
 
SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK operatorMethod (operator_equal, EQUAL) operatorMethod(operator_notEqual
 
SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL operatorMethod (operator_isGreaterThan, GREATERTHAN) operatorMethod(operator_isBackslashGreaterThan
 
SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN operatorMethod (operator_isLessThan, LESSTHAN) operatorMethod(operator_isBackslashLessThan
 
SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN operatorMethod (operator_isGreaterOrEqual, GREATERTHAN_EQUAL) operatorMethod(operator_isLessOrEqual
 
SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN LESSTHAN_EQUAL operatorMethod (operator_strictEqual, STRICT_EQUAL) operatorMethod(operator_strictNotEqual
 
SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN LESSTHAN_EQUAL STRICT_BACKSLASH_EQUAL operatorMethod (operator_strictGreaterThan, STRICT_GREATERTHAN) operatorMethod(operator_strictBackslashGreaterThan
 
SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN LESSTHAN_EQUAL STRICT_BACKSLASH_EQUAL STRICT_BACKSLASH_GREATERTHAN operatorMethod (operator_strictLessThan, STRICT_LESSTHAN) operatorMethod(operator_strictBackslashLessThan
 
SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN LESSTHAN_EQUAL STRICT_BACKSLASH_EQUAL STRICT_BACKSLASH_GREATERTHAN STRICT_BACKSLASH_LESSTHAN operatorMethod (operator_strictGreaterOrEqual, STRICT_GREATERTHAN_EQUAL) operatorMethod(operator_strictLessOrEqual
 
SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN LESSTHAN_EQUAL STRICT_BACKSLASH_EQUAL STRICT_BACKSLASH_GREATERTHAN STRICT_BACKSLASH_LESSTHAN STRICT_LESSTHAN_EQUAL operatorMethod (operator_lessThanGreaterThan, LESSTHAN_GREATERTHAN) operatorMethod(operator_greaterThanLessThan
 
SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN LESSTHAN_EQUAL STRICT_BACKSLASH_EQUAL STRICT_BACKSLASH_GREATERTHAN STRICT_BACKSLASH_LESSTHAN STRICT_LESSTHAN_EQUAL GREATERTHAN_LESSTHAN operatorMethod (operator_and, AND) operatorMethod(operator_or
 
SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN LESSTHAN_EQUAL STRICT_BACKSLASH_EQUAL STRICT_BACKSLASH_GREATERTHAN STRICT_BACKSLASH_LESSTHAN STRICT_LESSTHAN_EQUAL GREATERTHAN_LESSTHAN OR operatorMethod (operator_xor, XOR) prefixOperatorMethod(operator_not
 

Macro Definition Documentation

◆ operatorMethod

#define operatorMethod (   name,
  message 
)
Value:
RexxObject * RexxObject::name(RexxObject *operand) \
{\
ProtectedObject result; /* returned result */\
/* do a real message send */\
this->messageSend(OREF_##message, &operand, 1, 0, result); \
if ((RexxObject *)result == OREF_NULL) /* in an expression and need a result*/ \
{ \
RexxObject *self = this; \
bool alternativeResult = operand->messageSend(OREF_##message##_RIGHT, &self, 1, 0, result, false); \
if (alternativeResult && (RexxObject *)result != OREF_NULL) return (RexxObject *)result; \
/* need to raise an exception */ \
reportException(Error_No_result_object_message, OREF_##message); \
} \
return (RexxObject *)result; /* return the final result */ \
}\
#define OREF_NULL
Definition: RexxCore.h:61
#define Error_No_result_object_message
bool messageSend(RexxString *, RexxObject **, size_t, size_t, ProtectedObject &, bool processUnknown=true, bool dynamicTarget=true)

Definition at line 2739 of file ObjectClass.cpp.

◆ prefixOperatorMethod

#define prefixOperatorMethod (   name,
  message 
)
Value:
RexxObject * RexxObject::name(RexxObject *operand) \
{\
ProtectedObject result; /* returned result */\
/* do a real message send */\
this->messageSend(OREF_##message, &operand, operand == OREF_NULL ? 0 : 1, 0, result); \
if ((RexxObject *)result == OREF_NULL) /* in an expression and need a result*/ \
{ \
if (operand != OREF_NULL) \
{ \
RexxObject *self = this; \
bool alternativeResult = operand->messageSend(OREF_##message##_RIGHT, &self, 1, 0, result, false); \
if (alternativeResult && (RexxObject *)result != OREF_NULL) return (RexxObject *)result; \
} \
/* need to raise an exception */ \
reportException(Error_No_result_object_message, OREF_##message); \
} \
return (RexxObject *)result; /* return the final result */ \
}\

Definition at line 2757 of file ObjectClass.cpp.

Function Documentation

◆ operatorMethod() [1/15]

SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN LESSTHAN_EQUAL STRICT_BACKSLASH_EQUAL STRICT_BACKSLASH_GREATERTHAN STRICT_BACKSLASH_LESSTHAN STRICT_LESSTHAN_EQUAL GREATERTHAN_LESSTHAN operatorMethod ( operator_and  ,
AND   
)

◆ operatorMethod() [2/15]

SUBTRACT DIVIDE REMAINDER NULLSTRING operatorMethod ( operator_concat  ,
CONCATENATE   
)

◆ operatorMethod() [3/15]

SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK operatorMethod ( operator_equal  ,
EQUAL   
)

◆ operatorMethod() [4/15]

SUBTRACT DIVIDE operatorMethod ( operator_integerDivide  ,
INTDIV   
)

◆ operatorMethod() [5/15]

SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN operatorMethod ( operator_isGreaterOrEqual  ,
GREATERTHAN_EQUAL   
)

◆ operatorMethod() [6/15]

SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL operatorMethod ( operator_isGreaterThan  ,
GREATERTHAN   
)

◆ operatorMethod() [7/15]

SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN operatorMethod ( operator_isLessThan  ,
LESSTHAN   
)

◆ operatorMethod() [8/15]

SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN LESSTHAN_EQUAL STRICT_BACKSLASH_EQUAL STRICT_BACKSLASH_GREATERTHAN STRICT_BACKSLASH_LESSTHAN STRICT_LESSTHAN_EQUAL operatorMethod ( operator_lessThanGreaterThan  ,
LESSTHAN_GREATERTHAN   
)

◆ operatorMethod() [9/15]

SUBTRACT operatorMethod ( operator_multiply  ,
MULTIPLY   
)

◆ operatorMethod() [10/15]

SUBTRACT DIVIDE REMAINDER operatorMethod ( operator_power  ,
POWER   
)

◆ operatorMethod() [11/15]

SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN LESSTHAN_EQUAL operatorMethod ( operator_strictEqual  ,
STRICT_EQUAL   
)

◆ operatorMethod() [12/15]

SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN LESSTHAN_EQUAL STRICT_BACKSLASH_EQUAL STRICT_BACKSLASH_GREATERTHAN STRICT_BACKSLASH_LESSTHAN operatorMethod ( operator_strictGreaterOrEqual  ,
STRICT_GREATERTHAN_EQUAL   
)

◆ operatorMethod() [13/15]

SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN LESSTHAN_EQUAL STRICT_BACKSLASH_EQUAL operatorMethod ( operator_strictGreaterThan  ,
STRICT_GREATERTHAN   
)

◆ operatorMethod() [14/15]

SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN LESSTHAN_EQUAL STRICT_BACKSLASH_EQUAL STRICT_BACKSLASH_GREATERTHAN operatorMethod ( operator_strictLessThan  ,
STRICT_LESSTHAN   
)

◆ operatorMethod() [15/15]

SUBTRACT DIVIDE REMAINDER NULLSTRING BLANK BACKSLASH_EQUAL BACKSLASH_GREATERTHAN BACKSLASH_LESSTHAN LESSTHAN_EQUAL STRICT_BACKSLASH_EQUAL STRICT_BACKSLASH_GREATERTHAN STRICT_BACKSLASH_LESSTHAN STRICT_LESSTHAN_EQUAL GREATERTHAN_LESSTHAN OR operatorMethod ( operator_xor  ,
XOR   
)

◆ prefixOperatorMethod()

prefixOperatorMethod ( operator_plus  ,
PLUS   
)