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)  

RexxCollection.hpp
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 RexxCollection.hpp */
40 /* */
41 /* Primitive HashTableCollection Class */
42 /* */
43 /******************************************************************************/
44 #ifndef Included_RexxHashTableCollection
45 #define Included_RexxHashTableCollection
46 
47 #include "RexxHashTable.hpp"
48 
50  public:
51  void live(size_t);
52  void liveGeneral(int reason);
53  void flatten(RexxEnvelope *);
56  RexxObject * copy();
57  RexxArray * makeArray();
58 
60  virtual RexxObject *remove(RexxObject *key);
61  virtual RexxObject *get(RexxObject *key);
62  virtual RexxObject *put(RexxObject *, RexxObject *);
63  virtual RexxObject *add(RexxObject *, RexxObject *);
65  virtual RexxObject *hasItem(RexxObject *);
66  virtual RexxObject *getIndex(RexxObject * value);
67 
68  RexxObject *copyValues(int depth);
83  RexxObject *empty();
85 
86  inline HashLink items() { return this->contents->totalEntries(); };
87  inline HashLink first() { return this->contents->first(); };
88  inline HashLink next(HashLink pos) { return this->contents->next(pos);};
89  inline RexxObject *value(HashLink pos) {return this->contents->value(pos); };
90  inline RexxObject *index(HashLink pos) {return this->contents->index(pos); };
91  inline bool available(HashLink pos) {return this->contents->available(pos); };
92 
93  RexxHashTable *contents; /* collection associated hash table */
94  };
95  #endif
RexxHashTable::value
RexxObject * value(HashLink position)
Definition: RexxHashTable.cpp:1447
RexxHashTableCollection::putRexx
RexxObject * putRexx(RexxObject *, RexxObject *)
Definition: RexxCollection.cpp:258
RexxHashTableCollection::index
RexxObject * index(HashLink pos)
Definition: RexxCollection.hpp:90
RexxHashTableCollection::next
HashLink next(HashLink pos)
Definition: RexxCollection.hpp:88
RexxArray
Definition: ArrayClass.hpp:100
RexxHashTableCollection::indexRexx
RexxObject * indexRexx(RexxObject *value)
Definition: RexxCollection.cpp:388
RexxHashTable.hpp
RexxHashTableCollection::put
virtual RexxObject * put(RexxObject *, RexxObject *)
Definition: RexxCollection.cpp:279
RexxHashTableCollection::allAt
RexxObject * allAt(RexxObject *)
Definition: RexxCollection.cpp:196
RexxHashTableCollection::hasItemRexx
RexxObject * hasItemRexx(RexxObject *)
Definition: RexxCollection.cpp:456
RexxHashTableCollection::empty
RexxObject * empty()
Definition: RexxCollection.cpp:517
RexxHashTableCollection::removeItem
virtual RexxObject * removeItem(RexxObject *value)
Definition: RexxCollection.cpp:442
RexxHashTableCollection::liveGeneral
void liveGeneral(int reason)
Definition: RexxCollection.cpp:61
RexxHashTableCollection::copyValues
RexxObject * copyValues(int depth)
Definition: RexxCollection.cpp:334
RexxHashTableCollection::mergeItem
virtual RexxObject * mergeItem(RexxObject *, RexxObject *)
Definition: RexxCollection.cpp:140
RexxHashTableCollection::removeRexx
RexxObject * removeRexx(RexxObject *)
Definition: RexxCollection.cpp:168
RexxHashTableCollection::makeArray
RexxArray * makeArray()
Definition: RexxCollection.cpp:132
RexxHashTableCollection::items
HashLink items()
Definition: RexxCollection.hpp:86
RexxHashTableCollection::getIndex
virtual RexxObject * getIndex(RexxObject *value)
Definition: RexxCollection.cpp:412
RexxHashTableCollection::remove
virtual RexxObject * remove(RexxObject *key)
Definition: RexxCollection.cpp:190
RexxHashTableCollection
Definition: RexxCollection.hpp:49
RexxHashTableCollection::uniqueIndexes
RexxArray * uniqueIndexes()
Definition: RexxCollection.cpp:506
RexxHashTableCollection::isEmpty
RexxObject * isEmpty()
Definition: RexxCollection.cpp:529
RexxSupplier
Definition: SupplierClass.hpp:47
RexxHashTableCollection::add
virtual RexxObject * add(RexxObject *, RexxObject *)
Definition: RexxCollection.cpp:305
RexxEnvelope
Definition: RexxEnvelope.hpp:53
RexxHashTableCollection::getRexx
RexxObject * getRexx(RexxObject *)
Definition: RexxCollection.cpp:219
RexxHashTableCollection::addRexx
RexxObject * addRexx(RexxObject *, RexxObject *)
Definition: RexxCollection.cpp:291
RexxHashTableCollection::copy
RexxObject * copy()
Definition: RexxCollection.cpp:119
RexxHashTable::available
bool available(HashLink position)
Definition: RexxHashTable.hpp:135
RexxHashTableCollection::get
virtual RexxObject * get(RexxObject *key)
Definition: RexxCollection.cpp:242
RexxHashTableCollection::first
HashLink first()
Definition: RexxCollection.hpp:87
RexxHashTableCollection::value
RexxObject * value(HashLink pos)
Definition: RexxCollection.hpp:89
RexxHashTableCollection::removeItemRexx
RexxObject * removeItemRexx(RexxObject *value)
Definition: RexxCollection.cpp:426
RexxHashTableCollection::unflatten
RexxObject * unflatten(RexxEnvelope *)
Definition: RexxCollection.cpp:83
RexxHashTable::totalEntries
size_t totalEntries()
Definition: RexxHashTable.cpp:1465
RexxHashTable::index
RexxObject * index(HashLink position)
Definition: RexxHashTable.cpp:1801
RexxHashTableCollection::hasIndexRexx
RexxObject * hasIndexRexx(RexxObject *)
Definition: RexxCollection.cpp:369
RexxHashTable
Definition: RexxHashTable.hpp:60
RexxHashTableCollection::hasItem
virtual RexxObject * hasItem(RexxObject *)
Definition: RexxCollection.cpp:470
RexxHashTableCollection::allItems
RexxArray * allItems()
Definition: RexxCollection.cpp:485
HashLink
size_t HashLink
Definition: RexxHashTable.hpp:49
RexxHashTableCollection::contents
RexxHashTable * contents
Definition: RexxCollection.hpp:91
RexxHashTableCollection::live
void live(size_t)
Definition: RexxCollection.cpp:52
RexxHashTable::next
HashLink next(HashLink position)
Definition: RexxHashTable.cpp:1573
RexxHashTableCollection::merge
RexxObject * merge(RexxHashTableCollection *)
Definition: RexxCollection.cpp:324
RexxHashTableCollection::flatten
void flatten(RexxEnvelope *)
Definition: RexxCollection.cpp:70
RexxHashTableCollection::available
bool available(HashLink pos)
Definition: RexxCollection.hpp:91
RexxHashTableCollection::makeProxy
RexxObject * makeProxy(RexxEnvelope *)
Definition: RexxCollection.cpp:92
RexxHashTableCollection::allIndexes
RexxArray * allIndexes()
Definition: RexxCollection.cpp:493
RexxObject
Definition: ObjectClass.hpp:311
RexxHashTableCollection::supplier
RexxSupplier * supplier()
Definition: RexxCollection.cpp:476
RexxHashTable::first
HashLink first()
Definition: RexxHashTable.cpp:1561