From: <bi...@us...> - 2007-04-14 18:58:24
|
Revision: 281 http://svn.sourceforge.net/oorexx/?rev=281&view=rev Author: bigrixx Date: 2007-04-14 11:58:25 -0700 (Sat, 14 Apr 2007) Log Message: ----------- [ 1698603 ] Add hasItem and Index methods to other collections. The rest of the collections, minus stem, which will be addressed later. Modified Paths: -------------- interpreter-3.x/trunk/kernel/classes/DirectoryClass.cpp interpreter-3.x/trunk/kernel/classes/DirectoryClass.hpp interpreter-3.x/trunk/kernel/classes/ListClass.cpp interpreter-3.x/trunk/kernel/classes/ListClass.hpp interpreter-3.x/trunk/kernel/classes/QueueClass.cpp interpreter-3.x/trunk/kernel/classes/QueueClass.hpp interpreter-3.x/trunk/kernel/classes/RelationClass.cpp interpreter-3.x/trunk/kernel/classes/RelationClass.hpp interpreter-3.x/trunk/kernel/instructions/UseStrictInstruction.cpp interpreter-3.x/trunk/kernel/runtime/RexxCollection.cpp interpreter-3.x/trunk/kernel/runtime/RexxCollection.hpp interpreter-3.x/trunk/kernel/runtime/RexxHashTable.cpp interpreter-3.x/trunk/kernel/runtime/RexxHashTable.hpp interpreter-3.x/trunk/kernel/runtime/Setup.cpp Modified: interpreter-3.x/trunk/kernel/classes/DirectoryClass.cpp =================================================================== --- interpreter-3.x/trunk/kernel/classes/DirectoryClass.cpp 2007-04-14 16:22:38 UTC (rev 280) +++ interpreter-3.x/trunk/kernel/classes/DirectoryClass.cpp 2007-04-14 18:58:25 UTC (rev 281) @@ -649,6 +649,63 @@ } + +/** + * Retrieve an index for a given item. Which index is returned + * is indeterminate. + * + * @param target The target object. + * + * @return The index for the target object, or .nil if no object was + * found. + */ +RexxObject *RexxDirectory::indexRexx(RexxObject *target) +{ + // required argument + required_arg(target, ONE); + // retrieve this from the hash table + RexxObject *result = this->contents->getIndex(target); + // not found, return .nil + if (result == OREF_NULL) + { + // rats, we might need to do this the hardway + if (this->method_table != OREF_NULL) + { + RexxTable *methodTable = this->method_table; + + for (HashLink index = methodTable->first(); methodTable->available(index); index = methodTable->next(index)) + { + // we need to run each method, looking for a value that matches + RexxString *name = (RexxString *)methodTable->index(index); + RexxMethod *method = (RexxMethod *)methodTable->value(index); + RexxObject *value = method->run(CurrentActivity, this, name, 0, NULL); + // got a match? + if (target->equalValue(value)) + { + return name; // the name is the index + } + } + } + return TheNilObject; // the nil object is the unknown index + } + return result; +} + + +/** + * Test if a given item exists in the collection. + * + * @param target The target object. + * + * @return .true if the object exists, .false otherwise. + */ +RexxObject *RexxDirectory::hasItem(RexxObject *target) +{ + required_arg(target, ONE); + // the lookup is more complicated, so just delegate to the index lookup code. + return indexRexx(target) != TheNilObject ? TheTrueObject : TheFalseObject; +} + RexxObject *RexxDirectory::newRexx( RexxObject **init_args, size_t argCount) Modified: interpreter-3.x/trunk/kernel/classes/DirectoryClass.hpp =================================================================== --- interpreter-3.x/trunk/kernel/classes/DirectoryClass.hpp 2007-04-14 16:22:38 UTC (rev 280) +++ interpreter-3.x/trunk/kernel/classes/DirectoryClass.hpp 2007-04-14 18:58:25 UTC (rev 281) @@ -80,6 +80,8 @@ void reset(); RexxObject *empty(); RexxObject *isEmpty(); + RexxObject *indexRexx(RexxObject *); + RexxObject *hasItem(RexxObject *); RexxObject *newRexx(RexxObject **init_args, size_t); Modified: interpreter-3.x/trunk/kernel/classes/ListClass.cpp =================================================================== --- interpreter-3.x/trunk/kernel/classes/ListClass.cpp 2007-04-14 16:22:38 UTC (rev 280) +++ interpreter-3.x/trunk/kernel/classes/ListClass.cpp 2007-04-14 18:58:25 UTC (rev 281) @@ -786,6 +786,66 @@ } +/** + * Return the index of the first item with a matching value + * in the list. Returns .nil if the object is not found. + * + * @param target The target object. + * + * @return The index of the item, or .nil. + */ +RexxObject *RexxList::index(RexxObject *target) +{ + // we require the index to be there. + required_arg(target, ONE); + + // ok, now run the list looking for the target item + long next = this->first; + for (long i = 1; i <= this->count; i++) + { + LISTENTRY *element = ENTRY_POINTER(next); + // if we got a match, return the item + if (target->equalValue(element->value)) + { + return new_integer(next); + } + next = element->next; + } + // no match + return TheNilObject; +} + + +/** + * Tests whether there is an object with the given value in the + * list. + * + * @param target The target value. + * + * @return .true if there is a match, .false otherwise. + */ +RexxObject *RexxList::hasItem(RexxObject *target) +{ + // we require the index to be there. + required_arg(target, ONE); + + // ok, now run the list looking for the target item + long next = this->first; + for (long i = 1; i <= this->count; i++) + { + LISTENTRY *element = ENTRY_POINTER(next); + // if we got a match, return the item + if (target->equalValue(element->value)) + { + return TheTrueObject; + } + next = element->next; + } + // no match + return TheFalseObject; +} + + RexxObject *RexxList::indexOfValue( RexxObject *value) /*****************************************************************************/ Modified: interpreter-3.x/trunk/kernel/classes/ListClass.hpp =================================================================== --- interpreter-3.x/trunk/kernel/classes/ListClass.hpp 2007-04-14 16:22:38 UTC (rev 280) +++ interpreter-3.x/trunk/kernel/classes/ListClass.hpp 2007-04-14 18:58:25 UTC (rev 281) @@ -105,6 +105,8 @@ RexxObject *indexOfValue(RexxObject *); RexxObject *empty(); RexxObject *isEmpty(); + RexxObject *index(RexxObject *); + RexxObject *hasItem(RexxObject *); void addLast(RexxObject *value); void addFirst(RexxObject *value); Modified: interpreter-3.x/trunk/kernel/classes/QueueClass.cpp =================================================================== --- interpreter-3.x/trunk/kernel/classes/QueueClass.cpp 2007-04-14 16:22:38 UTC (rev 280) +++ interpreter-3.x/trunk/kernel/classes/QueueClass.cpp 2007-04-14 18:58:25 UTC (rev 281) @@ -261,7 +261,37 @@ } +/** + * Return the index of the first item with a matching value + * in the list. Returns .nil if the object is not found. + * + * @param target The target object. + * + * @return The index of the item, or .nil. + */ +RexxObject *RexxQueue::index(RexxObject *target) +{ + // we require the index to be there. + required_arg(target, ONE); + // ok, now run the list looking for the target item + long next = this->first; + for (long i = 1; i <= this->count; i++) + { + LISTENTRY *element = ENTRY_POINTER(next); + // if we got a match, return the item + if (target->equalValue(element->value)) + { + // queue indices are positional. + return new_integer(i); + } + next = element->next; + } + // no match + return TheNilObject; +} + + RexxObject *RexxQueue::newRexx(RexxObject **init_args, size_t argCount) /******************************************************************************/ /* Function: Create an instance of a queue */ Modified: interpreter-3.x/trunk/kernel/classes/QueueClass.hpp =================================================================== --- interpreter-3.x/trunk/kernel/classes/QueueClass.hpp 2007-04-14 16:22:38 UTC (rev 280) +++ interpreter-3.x/trunk/kernel/classes/QueueClass.hpp 2007-04-14 18:58:25 UTC (rev 281) @@ -67,6 +67,7 @@ RexxQueue *ofRexx(RexxObject **, size_t); RexxObject *append(RexxObject *); RexxArray *allIndexes(); + RexxObject *index(RexxObject *); inline RexxObject *pop() { return this->removeFirst();}; inline void push(RexxObject *obj) { this->addFirst(obj);}; Modified: interpreter-3.x/trunk/kernel/classes/RelationClass.cpp =================================================================== --- interpreter-3.x/trunk/kernel/classes/RelationClass.cpp 2007-04-14 16:22:38 UTC (rev 280) +++ interpreter-3.x/trunk/kernel/classes/RelationClass.cpp 2007-04-14 18:58:25 UTC (rev 281) @@ -133,9 +133,15 @@ /* Function: Remove an item from a relation using an index */ /******************************************************************************/ { - required_arg(value, ONE); /* make sure we have a value */ - required_arg(index, TWO); /* and the index */ - return this->contents->hasItem(value, index); + required_arg(value, ONE); /* make sure we have a value */ + if (index == OREF_NULL) // just an item search + { + return this->contents->hasItem(value); + } + else // tuple search + { + return this->contents->hasItem(value, index); + } } RexxObject *RexxRelation::allIndex( @@ -160,22 +166,7 @@ return this->contents->allIndex(index); } -RexxObject *RexxRelation::getIndex( - RexxObject *index) /* index to get */ -/******************************************************************************/ -/* Function: return all value with the same index */ -/******************************************************************************/ -{ - RexxObject *result; /* returned result */ - required_arg(index, ONE); /* make sure we have an index */ - /* just get from the hash table */ - result = this->contents->getIndex(index); - if (result == OREF_NULL) /* nothing found? */ - result = TheNilObject; /* just return a nil */ - return result; -} - RexxObject *RexxRelation::put( RexxObject *value, /* new value to add */ RexxObject *index) /* index for insertion */ Modified: interpreter-3.x/trunk/kernel/classes/RelationClass.hpp =================================================================== --- interpreter-3.x/trunk/kernel/classes/RelationClass.hpp 2007-04-14 16:22:38 UTC (rev 280) +++ interpreter-3.x/trunk/kernel/classes/RelationClass.hpp 2007-04-14 18:58:25 UTC (rev 281) @@ -58,7 +58,6 @@ RexxObject *hasItem(RexxObject *, RexxObject *); RexxObject *allAt(RexxObject *); RexxObject *allIndex(RexxObject *); - RexxObject *getIndex(RexxObject *); RexxObject *itemsRexx(RexxObject *); RexxSupplier *supplier(RexxObject *); RexxObject *removeItem(RexxObject *, RexxObject *); Modified: interpreter-3.x/trunk/kernel/instructions/UseStrictInstruction.cpp =================================================================== --- interpreter-3.x/trunk/kernel/instructions/UseStrictInstruction.cpp 2007-04-14 16:22:38 UTC (rev 280) +++ interpreter-3.x/trunk/kernel/instructions/UseStrictInstruction.cpp 2007-04-14 18:58:25 UTC (rev 281) @@ -195,7 +195,7 @@ } else { - RexxObject *defaultValue = variables[i].defaultValue; + RexxObject *defaultValue = variables[i].defaultValue->evaluate(context, stack); // and omitted argument is only value if we've marked it as optional // by giving it a default value @@ -225,7 +225,6 @@ report_exception2(Error_Incorrect_call_noarg, context->getCallname(), new_integer(i + 1)); } } - } } } Modified: interpreter-3.x/trunk/kernel/runtime/RexxCollection.cpp =================================================================== --- interpreter-3.x/trunk/kernel/runtime/RexxCollection.cpp 2007-04-14 16:22:38 UTC (rev 280) +++ interpreter-3.x/trunk/kernel/runtime/RexxCollection.cpp 2007-04-14 18:58:25 UTC (rev 281) @@ -301,6 +301,45 @@ return (value != OREF_NULL) ? (RexxObject *)TheTrueObject : (RexxObject *)TheFalseObject; } + +/** + * Retrieve an index for a given item. Which index is returned + * is indeterminate. + * + * @param target The target object. + * + * @return The index for the target object, or .nil if no object was + * found. + */ +RexxObject *RexxHashTableCollection::indexRexx(RexxObject *target) +{ + // required argument + required_arg(target, ONE); + // retrieve this from the hash table + RexxObject *result = this->contents->getIndex(target); + // not found, return .nil + if (result == OREF_NULL) + { + return TheNilObject; + } + return result; +} + + +/** + * Test if a given item exists in the collection. + * + * @param target The target object. + * + * @return .true if the object exists, .false otherwise. + */ +RexxObject *RexxHashTableCollection::hasItem(RexxObject *target) +{ + required_arg(target, ONE); + return this->contents->hasItem(target); +} + + RexxSupplier *RexxHashTableCollection::supplier() /******************************************************************************/ /* Function: create a table supplier */ Modified: interpreter-3.x/trunk/kernel/runtime/RexxCollection.hpp =================================================================== --- interpreter-3.x/trunk/kernel/runtime/RexxCollection.hpp 2007-04-14 16:22:38 UTC (rev 280) +++ interpreter-3.x/trunk/kernel/runtime/RexxCollection.hpp 2007-04-14 18:58:25 UTC (rev 281) @@ -64,7 +64,9 @@ RexxObject *put(RexxObject *, RexxObject *); RexxObject *add(RexxObject *, RexxObject *); RexxObject *allAt(RexxObject *); + RexxObject *hasItem(RexxObject *); RexxObject *hasIndex(RexxObject *); + RexxObject *indexRexx(RexxObject * value); RexxSupplier *supplier(); RexxObject *merge(RexxHashTableCollection *); RexxArray *allItems(); Modified: interpreter-3.x/trunk/kernel/runtime/RexxHashTable.cpp =================================================================== --- interpreter-3.x/trunk/kernel/runtime/RexxHashTable.cpp 2007-04-14 16:22:38 UTC (rev 280) +++ interpreter-3.x/trunk/kernel/runtime/RexxHashTable.cpp 2007-04-14 18:58:25 UTC (rev 281) @@ -546,6 +546,38 @@ return (RexxObject *)TheFalseObject; /* item was not found */ } + +/** + * Test if an item exists in the hash collection. + * + * @param value The test value. + * + * @return .true if it exists, .false otherwise. + */ +RexxObject *RexxHashTable::hasItem(RexxObject *value) +{ + // our size + size_t size = this->totalSlotsSize(); + + TABENTRY *ep = this->entries; + TABENTRY *endp = ep + size; + /* loop through all of the entries */ + for (; ep < endp; ep++) + { + // if we have an item, see if it's the one we're looking for. + if (ep->index != OREF_NULL) + { + if (EQUAL_VALUE(value, ep->value)) + { + return TheTrueObject; // return the index value + + } + } + } + return TheFalseObject; +} + + RexxObject *RexxHashTable::nextItem( RexxObject *value, /* item to locate */ RexxObject *index ) /* index to locate */ Modified: interpreter-3.x/trunk/kernel/runtime/RexxHashTable.hpp =================================================================== --- interpreter-3.x/trunk/kernel/runtime/RexxHashTable.hpp 2007-04-14 16:22:38 UTC (rev 280) +++ interpreter-3.x/trunk/kernel/runtime/RexxHashTable.hpp 2007-04-14 18:58:25 UTC (rev 281) @@ -108,6 +108,7 @@ RexxArray *stringGetAll(RexxString *key); RexxObject *stringMerge(RexxHashTable *target); RexxObject *hasItem(RexxObject * value, RexxObject *key); + RexxObject *hasItem(RexxObject * value); void reMerge(RexxHashTable *target); void primitiveMerge(RexxHashTable *target); RexxHashTable *insert(RexxObject *value, RexxObject *index, HashLink position, LONG type); Modified: interpreter-3.x/trunk/kernel/runtime/Setup.cpp =================================================================== --- interpreter-3.x/trunk/kernel/runtime/Setup.cpp 2007-04-14 16:22:38 UTC (rev 280) +++ interpreter-3.x/trunk/kernel/runtime/Setup.cpp 2007-04-14 18:58:25 UTC (rev 281) @@ -184,6 +184,8 @@ CPPMA(RexxDirectory::allItems), CPPMA(RexxDirectory::empty), CPPMA(RexxDirectory::isEmpty), +CPPMA(RexxDirectory::indexRexx), +CPPMA(RexxDirectory::hasItem), CPPMD(RexxDirectory::newRexx), @@ -240,6 +242,8 @@ CPPML(RexxList::allItems), CPPMA(RexxList::empty), CPPMA(RexxList::isEmpty), +CPPMA(RexxList::index), +CPPMA(RexxList::hasItem), CPPMLC(RexxListClass::newRexx), CPPMLC(RexxListClass::classOf), @@ -314,6 +318,7 @@ CPPMQ(RexxQueue::remove), CPPML(RexxQueue::append), CPPML(RexxQueue::allIndexes), +CPPML(RexxQueue::index), CPPMQ(RexxQueue::newRexx), CPPMQ(RexxQueue::ofRexx), @@ -450,45 +455,6 @@ CPPMMUTB(RexxMutableBuffer::setBufferSize), CPPMMUTB(RexxMutableBuffer::uninitMB), -CPPMSOM(RexxSOMProxy::operator_equal), - /* SOMProxy Operator methods.... */ -CPPMSOM(RexxSOMProxy::operator_plusRexx), -CPPMSOM(RexxSOMProxy::operator_minusRexx), -CPPMSOM(RexxSOMProxy::operator_multiplyRexx), -CPPMSOM(RexxSOMProxy::operator_divideRexx), -CPPMSOM(RexxSOMProxy::operator_integerDivideRexx), -CPPMSOM(RexxSOMProxy::operator_remainderRexx), -CPPMSOM(RexxSOMProxy::operator_powerRexx), -CPPMSOM(RexxSOMProxy::operator_abuttalRexx), -CPPMSOM(RexxSOMProxy::operator_concatRexx), -CPPMSOM(RexxSOMProxy::operator_concatBlankRexx), -CPPMSOM(RexxSOMProxy::operator_equalRexx), -CPPMSOM(RexxSOMProxy::operator_notEqualRexx), -CPPMSOM(RexxSOMProxy::operator_isGreaterThanRexx), -CPPMSOM(RexxSOMProxy::operator_isBackslashGreaterThanRexx), -CPPMSOM(RexxSOMProxy::operator_isLessThanRexx), -CPPMSOM(RexxSOMProxy::operator_isBackslashLessThanRexx), -CPPMSOM(RexxSOMProxy::operator_isGreaterOrEqualRexx), -CPPMSOM(RexxSOMProxy::operator_isLessOrEqualRexx), -CPPMSOM(RexxSOMProxy::operator_strictEqualRexx), -CPPMSOM(RexxSOMProxy::operator_strictNotEqualRexx), -CPPMSOM(RexxSOMProxy::operator_strictGreaterThanRexx), -CPPMSOM(RexxSOMProxy::operator_strictBackslashGreaterThanRexx), -CPPMSOM(RexxSOMProxy::operator_strictLessThanRexx), -CPPMSOM(RexxSOMProxy::operator_strictBackslashLessThanRexx), -CPPMSOM(RexxSOMProxy::operator_strictGreaterOrEqualRexx), -CPPMSOM(RexxSOMProxy::operator_strictLessOrEqualRexx), -CPPMSOM(RexxSOMProxy::operator_lessThanGreaterThanRexx), -CPPMSOM(RexxSOMProxy::operator_greaterThanLessThanRexx), -CPPMSOM(RexxSOMProxy::operator_andRexx), -CPPMSOM(RexxSOMProxy::operator_orRexx), -CPPMSOM(RexxSOMProxy::operator_xorRexx), -CPPMSOM(RexxSOMProxy::operator_notRexx), - -CPPMSOMCL(RexxSOMProxyClass::newRexx), -CPPMSOMCL(RexxSOMProxyClass::init), -CPPMSOMCL(RexxSOMProxyClass::somdNew), - CPPMSUP(RexxSupplier::available), /* Supplier methods */ CPPMSUP(RexxSupplier::next), CPPMSUP(RexxSupplier::value), @@ -503,23 +469,24 @@ CPPMHC(RexxHashTableCollection::add), CPPMHC(RexxHashTableCollection::allAt), CPPMHC(RexxHashTableCollection::hasIndex), -CPPMTBL(RexxTable::itemsRexx), CPPMHC(RexxHashTableCollection::merge), CPPMHC(RexxHashTableCollection::supplier), CPPMHC(RexxHashTableCollection::allItems), CPPMHC(RexxHashTableCollection::allIndexes), CPPMHC(RexxHashTableCollection::empty), CPPMHC(RexxHashTableCollection::isEmpty), +CPPMHC(RexxHashTableCollection::indexRexx), +CPPMHC(RexxHashTableCollection::hasItem), +CPPMTBL(RexxTable::itemsRexx), CPPMTBL(RexxTable::newRexx), CPPMREL(RexxRelation::put), /* Relation methods */ CPPMREL(RexxRelation::removeItemRexx), -CPPMREL(RexxRelation::hasItem), CPPMREL(RexxRelation::allIndex), -CPPMREL(RexxRelation::getIndex), CPPMREL(RexxRelation::itemsRexx), CPPMREL(RexxRelation::supplier), +CPPMREL(RexxRelation::hasItem), CPPMREL(RexxRelation::newRexx), @@ -907,7 +874,9 @@ defineProtectedKernelMethod(CHAR_SETMETHOD , TheDirectoryBehaviour, CPPMD(RexxDirectory::setMethod), 2); defineKernelMethod(CHAR_SUPPLIER , TheDirectoryBehaviour, CPPMD(RexxDirectory::supplier), 0); defineKernelMethod(CHAR_UNKNOWN , TheDirectoryBehaviour, CPPM(RexxObject::unknownRexx), 2); - defineProtectedKernelMethod(CHAR_UNSETMETHOD , TheDirectoryBehaviour, CPPMD(RexxDirectory::remove), 1); // ENG004M + defineProtectedKernelMethod(CHAR_UNSETMETHOD , TheDirectoryBehaviour, CPPMD(RexxDirectory::remove), 1); + defineKernelMethod(CHAR_INDEX , TheDirectoryBehaviour, CPPMD(RexxDirectory::indexRexx), 1); + defineKernelMethod(CHAR_HASITEM , TheDirectoryBehaviour, CPPMD(RexxDirectory::hasItem), 1); /* set the scope of the methods to */ /* this classes oref */ @@ -970,6 +939,8 @@ defineKernelMethod(CHAR_ALLINDEXES ,TheListBehaviour, CPPML(RexxList::allIndexes), 0); defineKernelMethod(CHAR_EMPTY ,TheListBehaviour, CPPML(RexxList::empty), 0); defineKernelMethod(CHAR_ISEMPTY ,TheListBehaviour, CPPML(RexxList::isEmpty), 0); + defineKernelMethod(CHAR_INDEX ,TheListBehaviour, CPPML(RexxList::index), 1); + defineKernelMethod(CHAR_HASITEM ,TheListBehaviour, CPPML(RexxList::hasItem), 1); /* set the scope of the methods to */ /* this classes oref */ TheListBehaviour->setMethodDictionaryScope(TheListClass); @@ -1076,6 +1047,8 @@ defineKernelMethod(CHAR_ALLINDEXES ,TheQueueBehaviour, CPPMQ(RexxQueue::allIndexes), 0); defineKernelMethod(CHAR_EMPTY ,TheQueueBehaviour, CPPMQ(RexxList::empty), 0); defineKernelMethod(CHAR_ISEMPTY ,TheQueueBehaviour, CPPMQ(RexxList::isEmpty), 0); + defineKernelMethod(CHAR_INDEX ,TheQueueBehaviour, CPPML(RexxQueue::index), 1); + defineKernelMethod(CHAR_HASITEM ,TheQueueBehaviour, CPPML(RexxList::hasItem), 1); /* set the scope of the methods to */ /* this classes oref */ @@ -1107,7 +1080,7 @@ defineKernelMethod(CHAR_AT , TheRelationBehaviour, CPPMHC(RexxHashTableCollection::getRexx), 1); defineKernelMethod(CHAR_HASINDEX , TheRelationBehaviour, CPPMHC(RexxHashTableCollection::hasIndex), 1); defineKernelMethod(CHAR_HASITEM , TheRelationBehaviour, CPPMREL(RexxRelation::hasItem), 2); - defineKernelMethod(CHAR_INDEX , TheRelationBehaviour, CPPMREL(RexxRelation::getIndex), 1); + defineKernelMethod(CHAR_INDEX , TheRelationBehaviour, CPPMREL(RexxHashTableCollection::indexRexx), 1); defineKernelMethod(CHAR_ITEMS , TheRelationBehaviour, CPPMREL(RexxRelation::itemsRexx), 1); defineKernelMethod(CHAR_PUT , TheRelationBehaviour, CPPMREL(RexxRelation::put), 2); defineKernelMethod(CHAR_REMOVE , TheRelationBehaviour, CPPMHC(RexxHashTableCollection::removeRexx), 1); @@ -1497,6 +1470,8 @@ defineKernelMethod(CHAR_ALLINDEXES , TheTableBehaviour, CPPMHC(RexxHashTableCollection::allIndexes), 0); defineKernelMethod(CHAR_EMPTY , TheTableBehaviour, CPPMHC(RexxHashTableCollection::empty), 0); defineKernelMethod(CHAR_ISEMPTY , TheTableBehaviour, CPPMHC(RexxHashTableCollection::isEmpty), 0); + defineKernelMethod(CHAR_INDEX , TheTableBehaviour, CPPMHC(RexxHashTableCollection::indexRexx), 1); + defineKernelMethod(CHAR_HASITEM , TheTableBehaviour, CPPMHC(RexxHashTableCollection::hasItem), 1); /* set the scope of the methods to */ /* this classes oref */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |