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 
55 /**
56  * Create initial class object at bootstrap time.
57  */
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, OREF_positional, 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 
92 /**
93  * Append an item after the last item in the list.
94  *
95  * @param value The value to append.
96  *
97  * @return The index of the appended item.
98  */
100 {
101 
102  requiredArgument(item, OREF_positional, 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, OREF_positional, 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  {
129  reportException(Error_Incorrect_method_noarg, OREF_positional, position);
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, OREF_positional, 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 
202 /**
203  * Insert an item into the queue at a specific index position.
204  *
205  * @param value The value to insert.
206  * @param index The index. This can be omitted, which inserts at the end, .nil
207  * which inserts at the beginning, or a valid existing index.
208  *
209  * @return The inserted object's index.
210  */
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, OREF_positional, 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  ProtectedObject p(values);
333  /* turn this into a supplier */
334  return new_supplier(values, OREF_NULL);
335 }
336 
337 
338 /**
339  * Retrieve an array containing all index values for the queue.
340  * For queue classes, the indices are the integers 1 - items(), so
341  * this is generally a pretty silly way to access this.
342  *
343  * @return An array containing all of the queue indices.
344  */
346 {
347  // create an array and protect it.
348  size_t arraysize = this->items();
349 
350  RexxArray *result = new_array(arraysize);
351  ProtectedObject p(result);
352 
353  // now just make an array containing each index value.
354  for (size_t i = 1; i <= arraysize; i++)
355  {
356  result->put(new_integer(i), i);
357  }
358  return result;
359 }
360 
361 
362 /**
363  * Return the index of the first item with a matching value
364  * in the list. Returns .nil if the object is not found.
365  *
366  * @param target The target object.
367  *
368  * @return The index of the item, or .nil.
369  */
371 {
372  // we require the index to be there.
373  requiredArgument(target, OREF_positional, ARG_ONE);
374 
375  // ok, now run the list looking for the target item
376  size_t nextEntry = this->first;
377  for (size_t i = 1; i <= this->count; i++)
378  {
379  LISTENTRY *element = ENTRY_POINTER(nextEntry);
380  // if we got a match, return the item
381  if (target->equalValue(element->value))
382  {
383  // queue indices are positional.
384  return new_integer(i);
385  }
386  nextEntry = element->next;
387  }
388  // no match
389  return TheNilObject;
390 }
391 
392 
394 /******************************************************************************/
395 /* Function: Return index of the first list item */
396 /******************************************************************************/
397 {
398  if (this->first == LIST_END)
399  {
400  return TheNilObject; // empty queue is the .nil object
401  }
402 
403  else
404  {
405  return (RexxObject *)IntegerOne; // first index is always one
406  }
407 }
408 
409 
411 /******************************************************************************/
412 /* Function: Return index of the last list item */
413 /******************************************************************************/
414 {
415  if (this->last == LIST_END)
416  {
417  return TheNilObject; // no last item is an empty queue...return .nil
418 
419  }
420  else
421  {
422  // return the item count as the final index
423  return (RexxObject *)new_integer(this->items());
424  }
425 }
426 
428  RexxObject *_index) /* index of the target item */
429 /******************************************************************************/
430 /* Function: Return the next item after the given indexed item */
431 /******************************************************************************/
432 {
433  LISTENTRY *element; /* current working entry */
434  /* locate this entry */
435  element = this->locateEntry(_index, (RexxObject *)IntegerOne);
436  if (element == NULL) /* not a valid index? */
437  {
439  }
440 
441  if (element->next == LIST_END) /* no next item? */
442  {
443  return TheNilObject; /* just return .nil */
444  }
445  else
446  {
447  /* return the next item */
448  return (RexxObject *)new_integer(entryToIndex(element->next));
449  }
450 }
451 
452 
454  RexxObject *_index) /* index of the target item */
455 /******************************************************************************/
456 /* Function: Return the item previous to the indexed item */
457 /******************************************************************************/
458 {
459  /* locate this entry */
460  LISTENTRY *element = this->locateEntry(_index, (RexxObject *)IntegerOne);
461  if (element == NULL) /* not a valid index? */
462  {
463  /* raise an error */
465  }
466 
467  if (element->previous == LIST_END) /* no previous item? */
468  {
469  return TheNilObject; /* just return .nil */
470  }
471  else
472  { /* return the previous item index */
473  return(RexxObject *)new_integer(entryToIndex(element->previous));
474  }
475 }
476 
477 
478 /**
479  * Convert an entry index into a queue index relative to the
480  * beginning.
481  *
482  * @param target The target index position.
483  *
484  * @return The queue index value.
485  */
486 size_t RexxQueue::entryToIndex(size_t target)
487 {
488  size_t current = this->first;
489  size_t counter = 0;
490  while (current != LIST_END)
491  {
492  counter++;
493  if (current == target)
494  {
495  return counter;
496  }
497 
498  current = ENTRY_POINTER(current)->next;
499  }
500 
501  return 0;
502 }
503 
504 /**
505  * Create a sublist of this queue.
506  *
507  * @param _index The starting index
508  * @param _count The size of the subset to extract.
509  *
510  * @return A new instance of this class containing the subsection items.
511  */
513 {
514  size_t counter; /* object counter */
515  /* locate this entry */
516  LISTENTRY *element = this->locateEntry(_index, (RexxObject *)IntegerOne);
517  if (_count != OREF_NULL)
518  { /* have a count? */
519  /* Make sure it's a good integer */
520  counter = _count->requiredNonNegative(OREF_positional, ARG_TWO);
521  }
522  else
523  {
524  counter = 999999999; /* just use largest possible count */
525  }
526  if (element == NULL) /* index doesn't exist? */
527  /* raise an error */
529  if (!isOfClass(Queue, this)) /* actually a queue subclass? */
530  {
531  /* need to do this the slow way */
532  return this->sectionSubclass(element, counter);
533  }
534  RexxQueue *result = new RexxQueue; /* create a new queue instance */
535  ProtectedObject p(result);
536  /* while still more to go and not at */
537  /* the end of the list */
538  while (counter--> 0)
539  { /* while still more items */
540  /* add the this item to new list */
541  result->addLast(element->value);
542  if (element->next == LIST_END) /* this the last one? */
543  {
544  break; /* done sectioning */
545  }
546  /* step to the next item */
547  element = ENTRY_POINTER(element->next);
548  }
549  return result; /* return the sectioned list */
550 }
551 
552 
553 
554 /**
555  * Section method used when dealing with a subclass of the Queue class.
556  *
557  * @param element The starting element.
558  * @param counter the number of items to extract.
559  *
560  * @return A new instance of the target class containing the
561  * subsection elements.
562  */
564 {
565  ProtectedObject r;
566  /* create a new list */
567  this->behaviour->getOwningClass()->sendMessage(OREF_NEW, r);
568  RexxQueue *newQueue = (RexxQueue *)(RexxObject *)r;
569  /* while still more to go and not at */
570  /* the end of the list */
571  while (counter-- > 0) /* while still more items */
572  {
573  /* add the this item to new list */
574  newQueue->sendMessage(OREF_INSERT, element->value);
575  if (element->next == LIST_END) /* this the last one? */
576  {
577  break; /* done sectioning */
578  }
579  /* step to the next item */
580  element = ENTRY_POINTER(element->next);
581  }
582  return newQueue; /* return the sectioned list */
583 }
584 
585 
586 RexxObject *RexxQueue::newRexx(RexxObject **init_args, size_t argCount, size_t named_argCount)
587 /******************************************************************************/
588 /* Function: Create an instance of a queue */
589 /******************************************************************************/
590 {
591  // this method is defined on the object class, but this is actually attached
592  // to a class object instance. Therefore, any use of the this pointer
593  // will be touching the wrong data. Use the classThis pointer for calling
594  // any methods on this object from this method.
595  RexxClass *classThis = (RexxClass *)this;
596  classThis->checkAbstract(); // ooRexx5
597 
598  RexxObject *newObj = new RexxQueue; /* get a new queue */
599  ProtectedObject p(newObj);
600  /* Initialize the new list instance */
601  newObj->setBehaviour(classThis->getInstanceBehaviour());
602  if (classThis->hasUninitDefined())
603  {
604  newObj->hasUninit();
605  }
606 
607  newObj->sendMessage(OREF_INIT, init_args, argCount, named_argCount);
608  return(RexxObject *)newObj; /* return the new object */
609 }
610 
612  RexxObject **args, /* array of list items */
613  size_t argCount, /* size of the argument array */
614  size_t named_argCount)
615 /******************************************************************************/
616 /* Function: Create a new queue containing the given items */
617 /******************************************************************************/
618 {
619  size_t arraysize; /* size of the array */
620  size_t i; /* loop counter */
621  RexxObject *item; /* item to add */
622 
623  if (TheQueueClass == ((RexxClass *)this))
624  { /* creating an internel list item? */
625  RexxQueue *newQueue; /* newly created list */
626  arraysize = argCount; /* get the array size */
627  newQueue = new RexxQueue; /* get a new list */
628  ProtectedObject p(newQueue);
629  for (i = 0; i < arraysize; i++)
630  { /* step through the array */
631  item = args[i]; /* get the next item */
632  if (item == OREF_NULL)
633  { /* omitted item? */
634  /* raise an error on this */
635  reportException(Error_Incorrect_method_noarg, OREF_positional, i + 1);
636  }
637  /* add this to the list end */
638  newQueue->addLast(item);
639  }
640  return newQueue;
641  }
642  else
643  {
644  ProtectedObject result;
645  arraysize = argCount; /* get the array size */
646  /* get a new list */
647  this->sendMessage(OREF_NEW, result);
648  RexxQueue *newQueue = (RexxQueue *)(RexxObject *)result;
649  for (i = 0; i < arraysize; i++)
650  { /* step through the array */
651  item = args[i]; /* get the next item */
652  if (item == OREF_NULL)
653  { /* omitted item? */
654  /* raise an error on this */
655  reportException(Error_Incorrect_method_noarg, OREF_positional, i + 1);
656  }
657  /* add this to the list end */
658  newQueue->sendMessage(OREF_QUEUENAME, item);
659  }
660  return newQueue; /* give back the list */
661  }
662 }
663 
664 
665 
666 void *RexxQueue::operator new(size_t size)
667 /******************************************************************************/
668 /* Function: Create an instance of a queue */
669 /******************************************************************************/
670 {
671  /* Get new object */
672  RexxQueue *newQueue = (RexxQueue *)new (INITIAL_LIST_SIZE, size) RexxListTable;
673  /* Give new object its behaviour */
674  newQueue->setBehaviour(TheQueueBehaviour);
675  newQueue->init(); /* finish initializing */
676  return newQueue; /* return the new list item */
677 }
678 
void reportException(wholenumber_t error)
RexxArray * new_array(size_t s)
Definition: ArrayClass.hpp:259
RexxInteger * new_integer(wholenumber_t v)
#define INITIAL_LIST_SIZE
Definition: ListClass.hpp:49
#define ENTRY_POINTER(n)
Definition: ListClass.hpp:58
#define LIST_END
Definition: ListClass.hpp:60
#define ENTRY_INDEX(p)
Definition: ListClass.hpp:59
#define TheQueueBehaviour
#define OREF_NULL
Definition: RexxCore.h:61
#define IntegerOne
Definition: RexxCore.h:200
#define OrefSet(o, r, v)
Definition: RexxCore.h:101
#define TheTrueObject
Definition: RexxCore.h:196
const int ARG_TWO
Definition: RexxCore.h:84
#define IntegerTwo
Definition: RexxCore.h:201
#define isOfClass(t, r)
Definition: RexxCore.h:224
#define TheNilObject
Definition: RexxCore.h:191
#define TheFalseObject
Definition: RexxCore.h:195
#define TheQueueClass
Definition: RexxCore.h:167
const int ARG_ONE
Definition: RexxCore.h:83
void requiredArgument(RexxObject *object, RexxString *kind, size_t position)
Definition: RexxCore.h:303
RexxInteger * REQUEST_INTEGER(RexxObject *obj)
Definition: RexxCore.h:460
#define Error_Incorrect_method_noarg
#define Error_Incorrect_method_queue_index
#define Error_Incorrect_method_index
#define CLASS_CREATE(name, id, className)
Definition: RexxMemory.hpp:503
RexxSupplier * new_supplier(RexxArray *c, RexxArray *f)
void put(RexxObject *eref, size_t pos)
Definition: ArrayClass.cpp:208
RexxClass * getOwningClass()
void checkAbstract()
RexxBehaviour * getInstanceBehaviour()
Definition: ClassClass.hpp:135
bool hasUninitDefined()
Definition: ClassClass.hpp:125
wholenumber_t wholeNumber()
void setBehaviour(RexxBehaviour *b)
RexxBehaviour * behaviour
size_t getFree()
Definition: ListClass.cpp:115
RexxArray * makeArray()
Definition: ListClass.cpp:873
size_t items()
Definition: ListClass.hpp:97
size_t last
Definition: ListClass.hpp:140
size_t count
Definition: ListClass.hpp:141
RexxObject * primitiveRemove(LISTENTRY *)
Definition: ListClass.cpp:640
RexxListTable * table
Definition: ListClass.hpp:138
RexxObject * firstItem()
Definition: ListClass.cpp:682
void addLast(RexxObject *value)
Definition: ListClass.cpp:455
size_t first
Definition: ListClass.hpp:139
void init()
Definition: ListClass.cpp:66
stringsize_t requiredNonNegative(RexxString *kind, size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
bool equalValue(RexxObject *other)
void sendMessage(RexxString *, RexxArray *, RexxDirectory *, ProtectedObject &)
RexxObject * next(RexxObject *)
Definition: QueueClass.cpp:427
RexxObject * insert(RexxObject *, RexxObject *)
Definition: QueueClass.cpp:211
RexxObject * peek()
Definition: QueueClass.cpp:317
LISTENTRY * locateEntry(RexxObject *, RexxObject *)
Definition: QueueClass.cpp:121
RexxObject * remove(RexxObject *)
Definition: QueueClass.cpp:294
RexxObject * lastRexx()
Definition: QueueClass.cpp:410
static void createInstance()
Definition: QueueClass.cpp:58
RexxObject * index(RexxObject *)
Definition: QueueClass.cpp:370
RexxObject * sectionSubclass(LISTENTRY *, size_t)
Definition: QueueClass.cpp:563
RexxObject * firstRexx()
Definition: QueueClass.cpp:393
RexxObject * pushRexx(RexxObject *)
Definition: QueueClass.cpp:78
void push(RexxObject *obj)
Definition: QueueClass.hpp:81
RexxObject * hasindex(RexxObject *)
Definition: QueueClass.cpp:305
RexxObject * supplier()
Definition: QueueClass.cpp:326
RexxObject * at(RexxObject *)
Definition: QueueClass.cpp:181
static RexxClass * classInstance
Definition: QueueClass.hpp:85
RexxObject * previous(RexxObject *)
Definition: QueueClass.cpp:453
RexxObject * section(RexxObject *, RexxObject *)
Definition: QueueClass.cpp:512
size_t entryToIndex(size_t target)
Definition: QueueClass.cpp:486
RexxObject * pullRexx()
Definition: QueueClass.cpp:64
RexxArray * allIndexes()
Definition: QueueClass.cpp:345
RexxObject * put(RexxObject *, RexxObject *)
Definition: QueueClass.cpp:162
RexxObject * newRexx(RexxObject **, size_t, size_t)
Definition: QueueClass.cpp:586
RexxObject * pop()
Definition: QueueClass.hpp:80
void queue(RexxObject *obj)
Definition: QueueClass.hpp:82
RexxQueue * ofRexx(RexxObject **, size_t, size_t)
Definition: QueueClass.cpp:611
RexxObject * append(RexxObject *)
Definition: QueueClass.cpp:99
RexxObject * queueRexx(RexxObject *)
Definition: QueueClass.cpp:109
ssize_t wholenumber_t
Definition: rexx.h:230
size_t previous
RexxObject * value