Go to the source code of this file.
Macros | |
| #define | fix_args(x) expandArgs(arguments, argcount, x##_MIN, x##_MAX, CHAR_##x) |
| #define | check_args(x) expandArgs(arguments, argcount, x##_MIN, x##_MAX, CHAR_##x) |
| #define | get_arg(x, n) arguments[x##_##n - 1] |
| #define | set_arg(x, n1, n2) arguments[x##_##n1 - 1] = arguments[x##_##n2 - 1] |
| #define | required_string(x, n) requiredStringArg(x##_##n, arguments, argcount, CHAR_##x) |
| #define | optional_string(x, n) optionalStringArg(x##_##n, arguments, argcount, CHAR_##x) |
| #define | required_text(x, n) requiredTextArg(x##_##n, arguments, argcount, CHAR_##x) |
| #define | required_integer(x, n) requiredIntegerArg(x##_##n, arguments, argcount, CHAR_##x) |
| #define | optional_integer(x, n) optionalIntegerArg(x##_##n, arguments, argcount, CHAR_##x) |
| #define | required_big_integer(x, n) requiredBigIntegerArg(x##_##n, arguments, argcount, CHAR_##x) |
| #define | optional_big_integer(x, n) optionalBigIntegerArg(x##_##n, arguments, argcount, CHAR_##x) |
| #define | optional_argument(x, n) ((argcount >= x##_##n) ? arguments[x##_##n -1] : OREF_NULL ) |
| #define | arg_exists(x, n) ((argcount < x##_##n) ? false : arguments[x##_##n - 1] != OREF_NULL ) |
| #define | arg_omitted(x, n) ((argcount < x##_##n) ? true : arguments[x##_##n - 1] == OREF_NULL ) |
| #define | BUILTIN(x) RexxObject *builtin_function_##x ( RexxActivation * context, RexxObject **arguments, size_t argcount, size_t named_argcount, RexxExpressionStack *stack ) |
| #define | positive_integer(n, f, p) if (n <= 0) reportException(Error_Incorrect_call_positive, CHAR_##f, OREF_positional, p, n) |
| #define | nonnegative_integer(n, f, p) if (n < 0) reportException(Error_Incorrect_call_nonnegative, CHAR_##f, OREF_positional, p, n) |
| #define | ALPHANUM "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" |
Functions | |
| void | expandArgs (RexxObject **arguments, size_t argcount, size_t min, size_t max, const char *function) |
| RexxString * | requiredStringArg (size_t position, RexxObject **arguments, size_t argcount, const char *function) |
| RexxString * | optionalStringArg (size_t position, RexxObject **arguments, size_t argcount, const char *function) |
| RexxInteger * | requiredIntegerArg (size_t position, RexxObject **arguments, size_t argcount, const char *function) |
| RexxInteger * | optionalIntegerArg (size_t position, RexxObject **arguments, size_t argcount, const char *function) |
| RexxObject * | requiredBigIntegerArg (size_t position, RexxObject **arguments, size_t argcount, const char *function) |
| RexxObject * | optionalBigIntegerArg (size_t position, RexxObject **arguments, size_t argcount, const char *function) |
| #define ALPHANUM "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" |
Definition at line 117 of file BuiltinFunctions.hpp.
| #define arg_exists | ( | x, | |
| n | |||
| ) | ((argcount < x##_##n) ? false : arguments[x##_##n - 1] != OREF_NULL ) |
Definition at line 109 of file BuiltinFunctions.hpp.
| #define arg_omitted | ( | x, | |
| n | |||
| ) | ((argcount < x##_##n) ? true : arguments[x##_##n - 1] == OREF_NULL ) |
Definition at line 110 of file BuiltinFunctions.hpp.
| #define BUILTIN | ( | x | ) | RexxObject *builtin_function_##x ( RexxActivation * context, RexxObject **arguments, size_t argcount, size_t named_argcount, RexxExpressionStack *stack ) |
Definition at line 112 of file BuiltinFunctions.hpp.
| #define check_args | ( | x | ) | expandArgs(arguments, argcount, x##_MIN, x##_MAX, CHAR_##x) |
Definition at line 92 of file BuiltinFunctions.hpp.
| #define fix_args | ( | x | ) | expandArgs(arguments, argcount, x##_MIN, x##_MAX, CHAR_##x) |
Definition at line 91 of file BuiltinFunctions.hpp.
| #define get_arg | ( | x, | |
| n | |||
| ) | arguments[x##_##n - 1] |
Definition at line 94 of file BuiltinFunctions.hpp.
| #define nonnegative_integer | ( | n, | |
| f, | |||
| p | |||
| ) | if (n < 0) reportException(Error_Incorrect_call_nonnegative, CHAR_##f, OREF_positional, p, n) |
Definition at line 115 of file BuiltinFunctions.hpp.
| #define optional_argument | ( | x, | |
| n | |||
| ) | ((argcount >= x##_##n) ? arguments[x##_##n -1] : OREF_NULL ) |
Definition at line 108 of file BuiltinFunctions.hpp.
| #define optional_big_integer | ( | x, | |
| n | |||
| ) | optionalBigIntegerArg(x##_##n, arguments, argcount, CHAR_##x) |
Definition at line 106 of file BuiltinFunctions.hpp.
| #define optional_integer | ( | x, | |
| n | |||
| ) | optionalIntegerArg(x##_##n, arguments, argcount, CHAR_##x) |
Definition at line 103 of file BuiltinFunctions.hpp.
| #define optional_string | ( | x, | |
| n | |||
| ) | optionalStringArg(x##_##n, arguments, argcount, CHAR_##x) |
Definition at line 98 of file BuiltinFunctions.hpp.
| #define positive_integer | ( | n, | |
| f, | |||
| p | |||
| ) | if (n <= 0) reportException(Error_Incorrect_call_positive, CHAR_##f, OREF_positional, p, n) |
Definition at line 114 of file BuiltinFunctions.hpp.
| #define required_big_integer | ( | x, | |
| n | |||
| ) | requiredBigIntegerArg(x##_##n, arguments, argcount, CHAR_##x) |
Definition at line 105 of file BuiltinFunctions.hpp.
| #define required_integer | ( | x, | |
| n | |||
| ) | requiredIntegerArg(x##_##n, arguments, argcount, CHAR_##x) |
Definition at line 102 of file BuiltinFunctions.hpp.
| #define required_string | ( | x, | |
| n | |||
| ) | requiredStringArg(x##_##n, arguments, argcount, CHAR_##x) |
Definition at line 97 of file BuiltinFunctions.hpp.
| #define required_text | ( | x, | |
| n | |||
| ) | requiredTextArg(x##_##n, arguments, argcount, CHAR_##x) |
Definition at line 100 of file BuiltinFunctions.hpp.
| #define set_arg | ( | x, | |
| n1, | |||
| n2 | |||
| ) | arguments[x##_##n1 - 1] = arguments[x##_##n2 - 1] |
Definition at line 95 of file BuiltinFunctions.hpp.
| void expandArgs | ( | RexxObject ** | arguments, |
| size_t | argcount, | ||
| size_t | min, | ||
| size_t | max, | ||
| const char * | function | ||
| ) |
Verify that a function has received all of its required arguments, and did not receive extras.
| argcount | The number of arguments passed to the function. |
| min | The minimum required arguments |
| max | The maximum required arguments |
| function | The function name |
Definition at line 76 of file BuiltinFunctions.cpp.
References Error_Incorrect_call_maxarg, Error_Incorrect_call_minarg, Error_Incorrect_call_noarg, min, OREF_NULL, and reportException().
| RexxObject* optionalBigIntegerArg | ( | size_t | position, |
| RexxObject ** | arguments, | ||
| size_t | argcount, | ||
| const char * | function | ||
| ) |
Process an optional argument and ensure it is a valid integer that can be expressed as a 64-bit value.
| position | The argument position for any error messages (1 to argcount). |
| argcount | The number of arguments passed to the function. |
| function | The function name |
Definition at line 309 of file BuiltinFunctions.cpp.
References Error_Incorrect_call_whole, Numerics::int64Object(), OREF_NULL, and reportException().
| RexxInteger* optionalIntegerArg | ( | size_t | position, |
| RexxObject ** | arguments, | ||
| size_t | argcount, | ||
| const char * | function | ||
| ) |
Process an optional argument and ensure it is a valid integer
| position | The argument position for any error messages (1 to argcount). |
| argcount | The number of arguments passed to the function. |
| function | The function name |
Definition at line 242 of file BuiltinFunctions.cpp.
References Numerics::ARGUMENT_DIGITS, Error_Incorrect_call_whole, isOfClass, new_integer(), OREF_NULL, reportException(), and RexxObject::requestNumber().
| RexxString* optionalStringArg | ( | size_t | position, |
| RexxObject ** | arguments, | ||
| size_t | argcount, | ||
| const char * | function | ||
| ) |
Process an optional argument and potentially convert it into a string argument
| position | The argument position for any error messages (1 to argcount). |
| argcount | The number of arguments passed to the function. |
| function | The function name |
Definition at line 156 of file BuiltinFunctions.cpp.
References isOfClass, OREF_NULL, and RexxObject::requestString().
| RexxObject* requiredBigIntegerArg | ( | size_t | position, |
| RexxObject ** | arguments, | ||
| size_t | argcount, | ||
| const char * | function | ||
| ) |
Process a required argument and ensure it is a valid integer that can be expressed as a 64-bit value.
| position | The argument position for any error messages (1 to argcount). |
| argcount | The number of arguments passed to the function. |
| function | The function name |
Definition at line 278 of file BuiltinFunctions.cpp.
References Error_Incorrect_call_noarg, Error_Incorrect_call_whole, Numerics::int64Object(), OREF_NULL, and reportException().
| RexxInteger* requiredIntegerArg | ( | size_t | position, |
| RexxObject ** | arguments, | ||
| size_t | argcount, | ||
| const char * | function | ||
| ) |
Process a required argument and ensure it is a valid integer
| position | The argument position for any error messages (1 to argcount). |
| argcount | The number of arguments passed to the function. |
| function | The function name |
Definition at line 210 of file BuiltinFunctions.cpp.
References Numerics::ARGUMENT_DIGITS, Error_Incorrect_call_noarg, Error_Incorrect_call_whole, isOfClass, new_integer(), OREF_NULL, reportException(), and RexxObject::requestNumber().
| RexxString* requiredStringArg | ( | size_t | position, |
| RexxObject ** | arguments, | ||
| size_t | argcount, | ||
| const char * | function | ||
| ) |
Process a required argument and potentially convert it into a string argument
| position | The argument position for any error messages (1 to argcount). |
| argcount | The number of arguments passed to the function. |
| function | The function name |
Definition at line 129 of file BuiltinFunctions.cpp.
References Error_Incorrect_call_noarg, isOfClass, OREF_NULL, reportException(), and RexxObject::requestString().