47 #ifndef RexxCore_INCLUDED
48 #define RexxCore_INCLUDED
61 #define OREF_NULL NULL
95 #define debug_encoding 0
101 #define OrefSet(o,r,v) ((o)->isOldSpace() ? memoryObject.setOref((void *)&(r),(RexxObject *)v) : (RexxObject *)(r=v))
103 #define OrefSet(o,r,v) memoryObject.checkSetOref((RexxObject *)o, (RexxObject **)&(r), (RexxObject *)v, __FILE__, __LINE__)
123 #ifndef INITGLOBALPTR
124 #define INITGLOBALPTR
127 #define EXTERN extern
131 #define EXTERNMEM extern
139 #define CLASS_EXTERNAL(b,c)
140 #define CLASS_INTERNAL(b,c)
142 #define koper(name) RexxObject *name(RexxObject *);
155 #define TheArrayClass RexxArray::classInstance
156 #define TheClassClass RexxClass::classInstance
157 #define TheDirectoryClass RexxDirectory::classInstance
158 #define TheIntegerClass RexxInteger::classInstance
159 #define TheListClass RexxList::classInstance
160 #define TheMessageClass RexxMessage::classInstance
161 #define TheMethodClass RexxMethod::classInstance
162 #define TheRoutineClass RoutineClass::classInstance
163 #define ThePackageClass PackageClass::classInstance
164 #define TheRexxContextClass RexxContext::classInstance
165 #define TheNumberStringClass RexxNumberString::classInstance
166 #define TheObjectClass RexxObject::classInstance
167 #define TheQueueClass RexxQueue::classInstance
168 #define TheStemClass RexxStem::classInstance
169 #define TheStringClass RexxString::classInstance
170 #define TheMutableBufferClass RexxMutableBuffer::classInstance
171 #define TheSupplierClass RexxSupplier::classInstance
172 #define TheTableClass RexxTable::classInstance
173 #define TheIdentityTableClass RexxIdentityTable::classInstance
174 #define TheRelationClass RexxRelation::classInstance
175 #define ThePointerClass RexxPointer::classInstance
176 #define TheBufferClass RexxBuffer::classInstance
177 #define TheWeakReferenceClass WeakReference::classInstance
178 #define TheStackFrameClass StackFrameClass::classInstance
179 #define TheRexxBlockClass RexxBlock::classInstance
180 #define TheRexxTextClass RexxText::classInstance
181 #define TheUnicodeClass Unicode::classInstance
183 #define TheEnvironment RexxMemory::environment
184 #define TheStaticRequires RexxMemory::staticRequires
185 #define TheFunctionsDirectory RexxMemory::functionsDir
186 #define TheCommonRetrievers RexxMemory::commonRetrievers
187 #define TheKernel RexxMemory::kernel
188 #define TheSystem RexxMemory::system
189 #define TheRexxPackage RexxMemory::rexxPackage
191 #define TheNilObject RexxNilObject::nilObject
193 #define TheNullArray RexxArray::nullArray
195 #define TheFalseObject RexxInteger::falseObject
196 #define TheTrueObject RexxInteger::trueObject
197 #define TheNullPointer RexxPointer::nullPointer
199 #define IntegerZero RexxInteger::integerZero
200 #define IntegerOne RexxInteger::integerOne
201 #define IntegerTwo RexxInteger::integerTwo
202 #define IntegerThree RexxInteger::integerThree
203 #define IntegerFour RexxInteger::integerFour
204 #define IntegerFive RexxInteger::integerFive
205 #define IntegerSix RexxInteger::integerSix
206 #define IntegerSeven RexxInteger::integerSeven
207 #define IntegerEight RexxInteger::integerEight
208 #define IntegerNine RexxInteger::integerNine
209 #define IntegerMinusOne RexxInteger::integerMinusOne
211 #define TheNullText RexxText::nullText
221 #define RXROUNDUP(n,to) ((((n)+(to-1))/(to))*to)
222 #define rounddown(n,to) (((n)/(to))*to)
224 #define isOfClass(t,r) (r)->isObjectType(The##t##Behaviour)
225 #define isOfClassType(t,r) (r)->isObjectType(T_##t)
232 #define env_find(s) (TheEnvironment->entry(s))
244 #define GLOBAL_NAME(name, value) EXTERN RexxString * OREF_##name INITGLOBALPTR;
322 return object->requiredString(kind, position);
336 return object->requiredString(kind, name);
467 for (
size_t i=0; i < argcount; i++)
526 if (this->
namedArguments == NULL)
throw std::invalid_argument(
"NamedArguments: memory error" );
537 if (this->
namedArguments == NULL)
throw std::invalid_argument(
"NamedArguments: this instance has been deleted" );
538 if (index >= this->
count)
throw std::invalid_argument(
"NamedArguments: invalid index" );
544 void match(
RexxObject **namedArglist,
size_t namedArgCount,
bool strict,
bool extraAllowed,
size_t minimumRequired=0);
550 bool match(
const char *name,
size_t nameLength,
RexxObject *value,
bool strict =
true,
size_t from = 0,
bool parse_time =
false);
555 bool checkNameMatching(
const char *name,
size_t nameLength,
size_t i,
bool parse_time);
569 return (object->*((
PCPPM1)cppEntry))(argument);
void reportException(wholenumber_t error)
void missingArgument(RexxString *kind, size_t argumentPosition)
RexxInteger * new_integer(wholenumber_t v)
RexxObject *(RexxObject::* PCPPM1)(RexxObject *)
RexxObject *(RexxObject::* PCPPM)()
RexxObject * resultOrNil(RexxInternalObject *o)
bool isInteger(RexxObject *o)
bool isStem(RexxObject *o)
codepoint_t optionalPadArgument(RexxObject *o, codepoint_t d, size_t p)
EXTERNMEM RexxMemory memoryObject
RexxObject * booleanObject(bool v)
RexxString * stringArgument(RexxObject *object, RexxString *kind, size_t position)
RexxArray * REQUEST_ARRAY(RexxObject *obj)
bool isNumberString(RexxObject *o)
wholenumber_t RexxErrorCodes
RexxString * REQUEST_STRING(RexxObject *object)
bool isPolymorphicString(RexxObject *o)
const int MAX_SYMBOL_LENGTH
size_t lengthArgument(RexxObject *o, size_t p)
size_t optionalPositive(RexxObject *o, size_t d, RexxString *kind, size_t p)
bool isString(RexxObject *o)
bool isMethod(RexxObject *o)
size_t optionalNonNegative(RexxObject *o, size_t d, RexxString *kind, size_t p)
codepoint_t padArgument(RexxObject *o, size_t p)
bool hasRexxTextArguments(RexxObject **arguments, size_t argcount, size_t named_argcount)
size_t optionalLengthArgument(RexxObject *o, size_t d, size_t p)
char optionalOptionArgument(RexxObject *o, char d, size_t p)
size_t optionalPositionArgument(RexxObject *o, size_t d, size_t p)
const int MAX_ERROR_NUMBER
void classArgument(RexxObject *object, RexxClass *clazz, RexxString *kind, RexxString *name)
bool isActivation(RexxObject *o)
size_t positionArgument(RexxObject *o, size_t p)
RexxObject * callOperatorMethod(RexxObject *object, size_t methodOffset, RexxObject *argument)
RexxArray * arrayArgument(RexxObject *object, RexxString *kind, size_t position)
RexxString * optionalStringArgument(RexxObject *o, RexxString *d, RexxString *kind, size_t p)
char optionArgument(RexxObject *o, size_t p)
void requiredArgument(RexxObject *object, RexxString *kind, size_t position)
bool isArray(RexxObject *o)
RexxInteger * REQUEST_INTEGER(RexxObject *obj)
#define Error_Invalid_argument_noarray
#define Error_Invalid_argument_noarg
#define Error_Invalid_argument_noclass
NamedArgument * namedArguments
void match(RexxObject **namedArglist, size_t namedArgCount, bool strict, bool extraAllowed, size_t minimumRequired=0)
bool checkNameMatching(const char *name, size_t nameLength, size_t i, bool parse_time)
NamedArguments(size_t count)
NamedArgument & operator[](size_t index)
static const size_t ARGUMENT_DIGITS
PCPPM getOperatorMethod(size_t index)
RexxBehaviour * behaviour
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)
RexxInteger * requestInteger(size_t)
RexxArray * requestArray()
RexxString * requestString()
bool isInstanceOf(RexxClass *)
NamedArgument(const char *name=NULL, RexxObject *value=OREF_NULL)