ooRexx  4.2.0-source
About: ooRexx (Open Object Rexx) is a free implementation of Object Rexx. Object Rexx is an enhancement of the classic Rexx interpreter; a full-featured programming language with a human-oriented syntax.
  Fossies Dox: ooRexx-4.2.0-source.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

QueueClass.cpp
Go to the documentation of this file.
1 /*----------------------------------------------------------------------------*/
2 /* */
3 /* Copyright (c) 1995, 2004 IBM Corporation. All rights reserved. */
4 /* Copyright (c) 2005-2009 Rexx Language Association. All rights reserved. */
5 /* */
6 /* This program and the accompanying materials are made available under */
7 /* the terms of the Common Public License v1.0 which accompanies this */
8 /* distribution. A copy is also available at the following address: */
9 /* http://www.oorexx.org/license.html */
10 /* */
11 /* Redistribution and use in source and binary forms, with or */
12 /* without modification, are permitted provided that the following */
13 /* conditions are met: */
14 /* */
15 /* Redistributions of source code must retain the above copyright */
16 /* notice, this list of conditions and the following disclaimer. */
17 /* Redistributions in binary form must reproduce the above copyright */
18 /* notice, this list of conditions and the following disclaimer in */
19 /* the documentation and/or other materials provided with the distribution. */
20 /* */
21 /* Neither the name of Rexx Language Association nor the names */
22 /* of its contributors may be used to endorse or promote products */
23 /* derived from this software without specific prior written permission. */
24 /* */
25 /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
26 /* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
27 /* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */
28 /* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
29 /* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
30 /* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
31 /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
32 /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */
33 /* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
34 /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
35 /* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
36 /* */
37 /*----------------------------------------------------------------------------*/
38 /******************************************************************************/
39 /* REXX Kernel QueueClass.c */
40 /* */
41 /* Primitive Queue Class */
42 /* */
43 /******************************************************************************/
44 #include "RexxCore.h"
45 #include "QueueClass.hpp"
46 #include "IntegerClass.hpp"
47 #include "SupplierClass.hpp"
48 #include "ActivityManager.hpp"
49 #include "ProtectedObject.hpp"
50 
51 // singleton class instance
53 
54 
59 {
60  CLASS_CREATE(Queue, "Queue", RexxClass);
61 }
62 
63 
65 /******************************************************************************/
66 /* Function: Pull an item off of the stack, returning .nil if no items */
67 /* are available */
68 /******************************************************************************/
69 {
70  RexxObject *item = this->pop(); /* remove the first item */
71  if (item == OREF_NULL) /* nothing there? */
72  {
73  item = TheNilObject; /* use .nil instead */
74  }
75  return item; /* return the pulled item */
76 }
77 
79 
80 /******************************************************************************/
81 /* Function: Push an item onto the queue */
82 /******************************************************************************/
83 {
84 
85  requiredArgument(item, ARG_ONE); /* make sure we have an argument */
86  this->push(item); /* push onto the queue */
87  return OREF_NULL; /* return nothing */
88 }
89 
90 
91 
100 {
101 
102  requiredArgument(item, ARG_ONE); /* make sure we have an argument */
103  this->queue(item); /* push onto the queue */
104  // the insertion index is the position.
105  return new_integer(this->count);
106 }
107 
108 
110 /******************************************************************************/
111 /* Function: Push an item onto the queue */
112 /******************************************************************************/
113 {
114  requiredArgument(item, ARG_ONE); /* make sure we have an argument */
115  /* add to the end of the queue */
116  this->queue(item);
117  return OREF_NULL; /* return nothing */
118 }
119 
120 
122 /******************************************************************************/
123 /* Function: Resolve a queue index argument to a list index */
124 /******************************************************************************/
125 {
126  // we must have an index
127  if (_index == OREF_NULL)
128  {
130  }
131 
132  // and it must be a valid whole number
133  RexxInteger *integerIndex = (RexxInteger *)REQUEST_INTEGER(_index);
134  if (integerIndex == TheNilObject)
135  {
137  }
138  // and positive
139  wholenumber_t item_index = integerIndex->wholeNumber();
140  if (item_index < 1)
141  {
143  }
144 
145  // we need to iterate through the entries to locate this
146  size_t listIndex = this->first;
147  while (listIndex != LIST_END)
148  {
149  // have we reached the entry? return the item
150  item_index--;
151  if (item_index == 0)
152  {
153  return ENTRY_POINTER(listIndex);
154  }
155  // step to the next entry
156  listIndex = ENTRY_POINTER(listIndex)->next;
157  }
158  return NULL; // this queue item not found
159 }
160 
161 
163  RexxObject *_value, /* value to add */
164  RexxObject *_index) /* target index */
165 /******************************************************************************/
166 /* Function: Replace the value of an item already in the queue. */
167 /******************************************************************************/
168 {
169  requiredArgument(_value, ARG_ONE); /* must have a value also */
170  /* locate this entry */
171  LISTENTRY *list_index = this->locateEntry(_index, IntegerTwo);
172  if (list_index == NULL) /* not a valid index? */
173  {
174  /* raise an error */
176  }
177  OrefSet(this->table, list_index->value, _value);
178  return OREF_NULL; /* return nothing at all */
179 }
180 
182  /* queue index item */
183 /******************************************************************************/
184 /* Function: Retrieve the value for a given queue index */
185 /******************************************************************************/
186 {
187  /* locate this entry */
188  LISTENTRY *list_index = this->locateEntry(_index, IntegerOne);
189  if (list_index == NULL) /* not a valid index? */
190  {
191  return TheNilObject; /* doesn't exist, return .NIL */
192  }
193  RexxObject *result = list_index->value; /* get the list entry */
194  if (result == OREF_NULL) /* not there? */
195  {
196  result = TheNilObject; /* just return NIL */
197  }
198  return(RexxObject *)result; /* return this item */
199 }
200 
201 
212 {
213  LISTENTRY *element; /* list element */
214  LISTENTRY *new_element; /* new insertion element */
215  size_t new_index; /* index of new inserted item */
216 
217  requiredArgument(_value, ARG_ONE); /* must have a value to insert */
218 
219  /* make sure we have room to insert */
220  new_index = this->getFree();
221  /* point to the actual element */
222  new_element = ENTRY_POINTER(new_index);
223  if (_index == TheNilObject) /* inserting at the front? */
224  {
225  element = NULL; /* flag this as new */
226  }
227  else if (_index == OREF_NULL)
228  { /* inserting at the end? */
229  if (this->last == LIST_END) /* currently empty? */
230  {
231  element = NULL; /* just use the front insert code */
232  }
233  else /* insert after the last element */
234  {
235  element = ENTRY_POINTER(this->last);
236  }
237  }
238  else
239  {
240  /* locate this entry */
241  element = this->locateEntry(_index, IntegerTwo);
242  if (element == NULL) /* index doesn't exist? */
243  {
244  /* raise an error */
246  }
247  }
248  this->count++; /* increase our count */
249  /* set the value */
250  OrefSet(this->table, new_element->value, _value);
251  if (element == NULL)
252  { /* adding at the front */
253  if (this->last == LIST_END)
254  { /* first element added? */
255  this->first = new_index; /* set this as the first */
256  this->last = new_index; /* and the last */
257  new_element->next = LIST_END; /* this is the last element */
258  new_element->previous = LIST_END;/* in both directions */
259  }
260  else
261  { /* adding at the front */
262 
263  new_element->next = this->first; /* previous is current first */
264  new_element->previous = LIST_END;/* nothing before this */
265  /* point to the first element */
266  element = ENTRY_POINTER(this->first);
267  element->previous = new_index; /* point it at the new entry */
268  this->first = new_index; /* this is the new first element */
269  }
270  }
271  else
272  { /* have a real insertion point */
273  /* set the next pointer */
274  new_element->previous = ENTRY_INDEX(element);
275 
276  if (element->next == LIST_END) /* inserting at the end? */
277  {
278  this->last = new_index; /* new first element */
279  }
280  else /* fudge the next element */
281  {
282  ENTRY_POINTER(element->next)->previous = new_index;
283  }
284  new_element->next = element->next; /* insert after this element */
285  element->next = new_index; /* new following one */
286  /* point at the insertion point */
287  new_element->previous = ENTRY_INDEX(element);
288  }
289  /* return this index item */
290  return new_integer(entryToIndex(new_index));
291 }
292 
293 
295 /******************************************************************************/
296 /* Function: Remove a given queue item */
297 /******************************************************************************/
298 {
299  /* locate this entry */
300  LISTENTRY *list_index = this->locateEntry(_index, IntegerOne);
301  /* remove from the list */
302  return this->primitiveRemove(list_index);
303 }
304 
306  /* queue index item */
307 /******************************************************************************/
308 /* Function: Return an index existence flag */
309 /******************************************************************************/
310 {
311  /* locate this entry */
312  LISTENTRY *list_index = this->locateEntry(_index, IntegerOne);
313  /* return an existence flag */
314  return (( list_index != NULL) ? TheTrueObject : TheFalseObject);
315 }
316 
318 /******************************************************************************/
319 /* Function: Return the first element of the queue without removing it */
320 /******************************************************************************/
321 {
322  return firstItem();
323 }
324 
325 
327 /******************************************************************************/
328 /* Function: Create a supplier for a queue object */
329 /******************************************************************************/
330 {
331  RexxArray *values = this->makeArray(); /* convert into an array */
332  /* turn this into a supplier */
333  return new_supplier(values, OREF_NULL);
334 }
335 
336 
345 {
346  // create an array and protect it.
347  size_t arraysize = this->items();
348 
349  RexxArray *result = new_array(arraysize);
350  ProtectedObject p(result);
351 
352  // now just make an array containing each index value.
353  for (size_t i = 1; i <= arraysize; i++)
354  {
355  result->put(new_integer(i), i);
356  }
357  return result;
358 }
359 
360 
370 {
371  // we require the index to be there.
372  requiredArgument(target, ARG_ONE);
373 
374  // ok, now run the list looking for the target item
375  size_t nextEntry = this->first;
376  for (size_t i = 1; i <= this->count; i++)
377  {
378  LISTENTRY *element = ENTRY_POINTER(nextEntry);
379  // if we got a match, return the item
380  if (target->equalValue(element->value))
381  {
382  // queue indices are positional.
383  return new_integer(i);
384  }
385  nextEntry = element->next;
386  }
387  // no match
388  return TheNilObject;
389 }
390 
391 
393 /******************************************************************************/
394 /* Function: Return index of the first list item */
395 /******************************************************************************/
396 {
397  if (this->first == LIST_END)
398  {
399  return TheNilObject; // empty queue is the .nil object
400  }
401 
402  else
403  {
404  return (RexxObject *)IntegerOne; // first index is always one
405  }
406 }
407 
408 
410 /******************************************************************************/
411 /* Function: Return index of the last list item */
412 /******************************************************************************/
413 {
414  if (this->last == LIST_END)
415  {
416  return TheNilObject; // no last item is an empty queue...return .nil
417 
418  }
419  else
420  {
421  // return the item count as the final index
422  return (RexxObject *)new_integer(this->items());
423  }
424 }
425 
427  RexxObject *_index) /* index of the target item */
428 /******************************************************************************/
429 /* Function: Return the next item after the given indexed item */
430 /******************************************************************************/
431 {
432  LISTENTRY *element; /* current working entry */
433  /* locate this entry */
434  element = this->locateEntry(_index, (RexxObject *)IntegerOne);
435  if (element == NULL) /* not a valid index? */
436  {
438  }
439 
440  if (element->next == LIST_END) /* no next item? */
441  {
442  return TheNilObject; /* just return .nil */
443  }
444  else
445  {
446  /* return the next item */
447  return (RexxObject *)new_integer(entryToIndex(element->next));
448  }
449 }
450 
451 
453  RexxObject *_index) /* index of the target item */
454 /******************************************************************************/
455 /* Function: Return the item previous to the indexed item */
456 /******************************************************************************/
457 {
458  /* locate this entry */
459  LISTENTRY *element = this->locateEntry(_index, (RexxObject *)IntegerOne);
460  if (element == NULL) /* not a valid index? */
461  {
462  /* raise an error */
464  }
465 
466  if (element->previous == LIST_END) /* no previous item? */
467  {
468  return TheNilObject; /* just return .nil */
469  }
470  else
471  { /* return the previous item index */
472  return(RexxObject *)new_integer(entryToIndex(element->previous));
473  }
474 }
475 
476 
485 size_t RexxQueue::entryToIndex(size_t target)
486 {
487  size_t current = this->first;
488  size_t counter = 0;
489  while (current != LIST_END)
490  {
491  counter++;
492  if (current == target)
493  {
494  return counter;
495  }
496 
497  current = ENTRY_POINTER(current)->next;
498  }
499 
500  return 0;
501 }
502 
512 {
513  size_t counter; /* object counter */
514  /* locate this entry */
515  LISTENTRY *element = this->locateEntry(_index, (RexxObject *)IntegerOne);
516  if (_count != OREF_NULL)
517  { /* have a count? */
518  /* Make sure it's a good integer */
519  counter = _count->requiredNonNegative(ARG_TWO);
520  }
521  else
522  {
523  counter = 999999999; /* just use largest possible count */
524  }
525  if (element == NULL) /* index doesn't exist? */
526  /* raise an error */
528  if (!isOfClass(Queue, this)) /* actually a queue subclass? */
529  {
530  /* need to do this the slow way */
531  return this->sectionSubclass(element, counter);
532  }
533  RexxQueue *result = new RexxQueue; /* create a new queue instance */
534  ProtectedObject p(result);
535  /* while still more to go and not at */
536  /* the end of the list */
537  while (counter--> 0)
538  { /* while still more items */
539  /* add the this item to new list */
540  result->addLast(element->value);
541  if (element->next == LIST_END) /* this the last one? */
542  {
543  break; /* done sectioning */
544  }
545  /* step to the next item */
546  element = ENTRY_POINTER(element->next);
547  }
548  return result; /* return the sectioned list */
549 }
550 
551 
552 
563 {
564  ProtectedObject r;
565  /* create a new list */
566  this->behaviour->getOwningClass()->sendMessage(OREF_NEW, r);
567  RexxQueue *newQueue = (RexxQueue *)(RexxObject *)r;
568  /* while still more to go and not at */
569  /* the end of the list */
570  while (counter-- > 0) /* while still more items */
571  {
572  /* add the this item to new list */
573  newQueue->sendMessage(OREF_INSERT, element->value);
574  if (element->next == LIST_END) /* this the last one? */
575  {
576  break; /* done sectioning */
577  }
578  /* step to the next item */
579  element = ENTRY_POINTER(element->next);
580  }
581  return newQueue; /* return the sectioned list */
582 }
583 
584 
585 RexxObject *RexxQueue::newRexx(RexxObject **init_args, size_t argCount)
586 /******************************************************************************/
587 /* Function: Create an instance of a queue */
588 /******************************************************************************/
589 {
590  RexxObject *newObj = new RexxQueue; /* get a new queue */
591  ProtectedObject p(newObj);
592  /* Initialize the new list instance */
593  newObj->setBehaviour(((RexxClass *)this)->getInstanceBehaviour());
594  if (((RexxClass *)this)->hasUninitDefined())
595  {
596  newObj->hasUninit();
597  }
598 
599  newObj->sendMessage(OREF_INIT, init_args, argCount);
600  return(RexxObject *)newObj; /* return the new object */
601 }
602 
604  RexxObject **args, /* array of list items */
605  size_t argCount) /* size of the argument array */
606 /******************************************************************************/
607 /* Function: Create a new queue containing the given items */
608 /******************************************************************************/
609 {
610  size_t arraysize; /* size of the array */
611  size_t i; /* loop counter */
612  RexxObject *item; /* item to add */
613 
614  if (TheQueueClass == ((RexxClass *)this))
615  { /* creating an internel list item? */
616  RexxQueue *newQueue; /* newly created list */
617  arraysize = argCount; /* get the array size */
618  newQueue = new RexxQueue; /* get a new list */
619  ProtectedObject p(newQueue);
620  for (i = 0; i < arraysize; i++)
621  { /* step through the array */
622  item = args[i]; /* get the next item */
623  if (item == OREF_NULL)
624  { /* omitted item? */
625  /* raise an error on this */
627  }
628  /* add this to the list end */
629  newQueue->addLast(item);
630  }
631  return newQueue;
632  }
633  else
634  {
635  ProtectedObject result;
636  arraysize = argCount; /* get the array size */
637  /* get a new list */
638  this->sendMessage(OREF_NEW, result);
639  RexxQueue *newQueue = (RexxQueue *)(RexxObject *)result;
640  for (i = 0; i < arraysize; i++)
641  { /* step through the array */
642  item = args[i]; /* get the next item */
643  if (item == OREF_NULL)
644  { /* omitted item? */
645  /* raise an error on this */
647  }
648  /* add this to the list end */
649  newQueue->sendMessage(OREF_QUEUENAME, item);
650  }
651  return newQueue; /* give back the list */
652  }
653 }
654 
655 
656 
657 void *RexxQueue::operator new(size_t size)
658 /******************************************************************************/
659 /* Function: Create an instance of a queue */
660 /******************************************************************************/
661 {
662  /* Get new object */
663  RexxQueue *newQueue = (RexxQueue *)new (INITIAL_LIST_SIZE, size) RexxListTable;
664  /* Give new object its behaviour */
665  newQueue->setBehaviour(TheQueueBehaviour);
666  newQueue->init(); /* finish initializing */
667  return newQueue; /* return the new list item */
668 }
669 
TheQueueClass
#define TheQueueClass
Definition: RexxCore.h:160
RexxList::count
size_t count
Definition: ListClass.hpp:141
RexxList::last
size_t last
Definition: ListClass.hpp:140
RexxObject::sendMessage
void sendMessage(RexxString *, RexxArray *, ProtectedObject &)
Definition: ObjectClass.cpp:668
new_array
RexxArray * new_array(size_t s)
Definition: ArrayClass.hpp:250
RexxQueue::peek
RexxObject * peek()
Definition: QueueClass.cpp:317
RexxArray
Definition: ArrayClass.hpp:100
listentry::value
RexxObject * value
Definition: RexxListTable.hpp:50
RexxQueue::hasindex
RexxObject * hasindex(RexxObject *)
Definition: QueueClass.cpp:305
listentry::previous
size_t previous
Definition: RexxListTable.hpp:52
RexxList::init
void init()
Definition: ListClass.cpp:66
TheFalseObject
#define TheFalseObject
Definition: RexxCore.h:184
RexxQueue::previous
RexxObject * previous(RexxObject *)
Definition: QueueClass.cpp:452
RexxQueue::pullRexx
RexxObject * pullRexx()
Definition: QueueClass.cpp:64
RexxListTable
Definition: RexxListTable.hpp:55
new_integer
RexxInteger * new_integer(wholenumber_t v)
Definition: IntegerClass.hpp:198
RexxQueue
Definition: QueueClass.hpp:49
RexxObject::equalValue
bool equalValue(RexxObject *other)
Definition: ObjectClass.hpp:499
RexxInternalObject::behaviour
RexxBehaviour * behaviour
Definition: ObjectClass.hpp:306
OrefSet
#define OrefSet(o, r, v)
Definition: RexxCore.h:94
RexxQueue::remove
RexxObject * remove(RexxObject *)
Definition: QueueClass.cpp:294
IntegerClass.hpp
RexxList::firstItem
RexxObject * firstItem()
Definition: ListClass.cpp:681
Error_Incorrect_method_queue_index
#define Error_Incorrect_method_queue_index
Definition: RexxErrorCodes.h:512
listentry::next
size_t next
Definition: RexxListTable.hpp:51
ActivityManager.hpp
SupplierClass.hpp
new_supplier
RexxSupplier * new_supplier(RexxArray *c, RexxArray *f)
Definition: SupplierClass.hpp:80
requiredArgument
void requiredArgument(RexxObject *object, size_t position)
Definition: RexxCore.h:284
RexxQueue::pop
RexxObject * pop()
Definition: QueueClass.hpp:80
RexxInteger::wholeNumber
wholenumber_t wholeNumber()
Definition: IntegerClass.hpp:142
ARG_TWO
const int ARG_TWO
Definition: RexxCore.h:81
RexxInternalObject::hasUninit
void hasUninit()
Definition: ObjectClass.cpp:1873
Error_Incorrect_method_noarg
#define Error_Incorrect_method_noarg
Definition: RexxErrorCodes.h:457
reportException
void reportException(wholenumber_t error)
Definition: ActivityManager.hpp:136
TheTrueObject
#define TheTrueObject
Definition: RexxCore.h:185
RexxQueue::ofRexx
RexxQueue * ofRexx(RexxObject **, size_t)
Definition: QueueClass.cpp:603
RexxList::first
size_t first
Definition: ListClass.hpp:139
RexxQueue::append
RexxObject * append(RexxObject *)
Definition: QueueClass.cpp:99
isOfClass
#define isOfClass(t, r)
Definition: RexxCore.h:211
RexxQueue::supplier
RexxObject * supplier()
Definition: QueueClass.cpp:326
Error_Incorrect_method_index
#define Error_Incorrect_method_index
Definition: RexxErrorCodes.h:471
RexxQueue::sectionSubclass
RexxObject * sectionSubclass(LISTENTRY *, size_t)
Definition: QueueClass.cpp:562
RexxQueue::queueRexx
RexxObject * queueRexx(RexxObject *)
Definition: QueueClass.cpp:109
RexxQueue::createInstance
static void createInstance()
Definition: QueueClass.cpp:58
ARG_ONE
const int ARG_ONE
Definition: RexxCore.h:80
OREF_NULL
#define OREF_NULL
Definition: RexxCore.h:60
RexxQueue::section
RexxObject * section(RexxObject *, RexxObject *)
Definition: QueueClass.cpp:511
listentry
Definition: RexxListTable.hpp:49
RexxArray::put
void put(RexxObject *eref, size_t pos)
Definition: ArrayClass.cpp:203
RexxQueue::next
RexxObject * next(RexxObject *)
Definition: QueueClass.cpp:426
RexxBehaviour::getOwningClass
RexxClass * getOwningClass()
Definition: RexxBehaviour.hpp:97
IntegerTwo
#define IntegerTwo
Definition: RexxCore.h:190
RexxClass
Definition: ClassClass.hpp:49
RexxInternalObject::setBehaviour
void setBehaviour(RexxBehaviour *b)
Definition: ObjectClass.hpp:265
ProtectedObject.hpp
RexxObject::requiredNonNegative
stringsize_t requiredNonNegative(size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
Definition: ObjectClass.cpp:1442
RexxQueue::allIndexes
RexxArray * allIndexes()
Definition: QueueClass.cpp:344
RexxQueue::RexxQueue
RexxQueue()
Definition: QueueClass.hpp:54
ProtectedObject
Definition: ProtectedObject.hpp:46
RexxList::getFree
size_t getFree()
Definition: ListClass.cpp:114
REQUEST_INTEGER
RexxInteger * REQUEST_INTEGER(RexxObject *obj)
Definition: RexxCore.h:436
INITIAL_LIST_SIZE
#define INITIAL_LIST_SIZE
Definition: ListClass.hpp:49
RexxQueue::index
RexxObject * index(RexxObject *)
Definition: QueueClass.cpp:369
IntegerOne
#define IntegerOne
Definition: RexxCore.h:189
CLASS_CREATE
#define CLASS_CREATE(name, id, className)
Definition: RexxMemory.hpp:445
RexxQueue::push
void push(RexxObject *obj)
Definition: QueueClass.hpp:81
ENTRY_INDEX
#define ENTRY_INDEX(p)
Definition: ListClass.hpp:59
RexxQueue::entryToIndex
size_t entryToIndex(size_t target)
Definition: QueueClass.cpp:485
RexxQueue::newRexx
RexxObject * newRexx(RexxObject **, size_t)
Definition: QueueClass.cpp:585
RexxList::primitiveRemove
RexxObject * primitiveRemove(LISTENTRY *)
Definition: ListClass.cpp:639
wholenumber_t
ssize_t wholenumber_t
Definition: rexx.h:229
RexxQueue::locateEntry
LISTENTRY * locateEntry(RexxObject *, RexxObject *)
Definition: QueueClass.cpp:121
RexxQueue::lastRexx
RexxObject * lastRexx()
Definition: QueueClass.cpp:409
RexxQueue::queue
void queue(RexxObject *obj)
Definition: QueueClass.hpp:82
QueueClass.hpp
RexxQueue::put
RexxObject * put(RexxObject *, RexxObject *)
Definition: QueueClass.cpp:162
RexxQueue::insert
RexxObject * insert(RexxObject *, RexxObject *)
Definition: QueueClass.cpp:211
TheNilObject
#define TheNilObject
Definition: RexxCore.h:180
RexxQueue::at
RexxObject * at(RexxObject *)
Definition: QueueClass.cpp:181
LIST_END
#define LIST_END
Definition: ListClass.hpp:60
TheQueueBehaviour
#define TheQueueBehaviour
Definition: PrimitiveBehaviourNames.h:70
RexxCore.h
RexxList::table
RexxListTable * table
Definition: ListClass.hpp:138
RexxQueue::classInstance
static RexxClass * classInstance
Definition: QueueClass.hpp:85
RexxQueue::pushRexx
RexxObject * pushRexx(RexxObject *)
Definition: QueueClass.cpp:78
RexxList::items
size_t items()
Definition: ListClass.hpp:97
RexxInteger
Definition: IntegerClass.hpp:56
RexxQueue::firstRexx
RexxObject * firstRexx()
Definition: QueueClass.cpp:392
RexxList::makeArray
RexxArray * makeArray()
Definition: ListClass.cpp:872
RexxList::addLast
void addLast(RexxObject *value)
Definition: ListClass.cpp:454
ENTRY_POINTER
#define ENTRY_POINTER(n)
Definition: ListClass.hpp:58
RexxObject
Definition: ObjectClass.hpp:311