RWOrdered man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



RWOrdered(3C++)						       RWOrdered(3C++)

Name
     RWOrdered - Rogue Wave library class

Synopsis
	      #include <rw/ordcltn.h>

	      RWOrdered a;

Description
     Class RWOrdered represents a group of ordered items, accessible by an
     index number, but not accessible by an external key.  Duplicates are
     allowed.  The ordering of elements is determined externally, generally by
     the order of insertion and removal.  An object stored by RWOrdered must
     inherit from the abstract base class RWCollectable.  Class RWOrdered is
     implemented as a vector of pointers, allowing for more efficient
     traversing of the collection than the linked list classes.
     RWSlistCollectables and RWDlistCollectables, but slower insertion in the
     center of the collection.

Persistence
     Polymorphic

Public Constructors
	      RWOrdered(size_t size = RWDEFAULT_CAPACITY);

     Construct an RWOrdered with an initial capacity of size.

Public Member Operators
	      RWBoolean
	  operator==(const RWOrdered& od) const;

     Returns TRUE if for every item in self, the corresponding item in od at
     the same index isEqual.  The two collections must also have the same
     number of members.

	      RWCollectable*&
	  operator[](size_t i);

     Returns the ith element in the collection.	 If i is out of range, an
     exception of type RWBoundsErr will occur.	The results of this function

									Page 1

RWOrdered(3C++)						       RWOrdered(3C++)

     can be used as an lvalue.

	      RWCollectable*&
	  operator()(size_t i);

     Returns the ith element in the collection.	 Bounds checking is enabled by
     defining the preprocessor directive RWBOUNDS_CHECK before including the
     header file ordcltn.h.  In this case, if i is out of range, an exception
     of type RWBoundsErr will occur.  The results of this function can be used
     as an lvalue.

Public Member Functions
	      virtual RWCollectable*
	  append(RWCollectable*);

     Redefined from class RWSequenceable.  Adds the item to the end of the
     collection and returns it.	 Returns nil if the insertion was
     unsuccessful.

	      virtual void
	  apply(RWapplyCollectable ap, void* x);

     Redefined from class RWCollection.	 This function has been redefined to
     apply the user-supplied function pointed to by ap to each member of the
     collection, in order, from first to last.

	      virtual RWCollectable*&
	  at(size_t i);
	  virtual const RWCollectable*
	  at(size_t i) const;

     Redefined from class RWSequenceable.

	      virtual RWspace
	  binaryStoreSize() const;

     Inherited from class RWCollection.

	      virtual void
	  clear();

     Redefined from class RWCollection.

	      virtual void
	  clearAndDestroy();

									Page 2

RWOrdered(3C++)						       RWOrdered(3C++)

     Inherited from class RWCollection.

	      virtual int
	  compareTo(const RWCollectable* a) const;

     Inherited from class RWCollectable.

	      virtual RWBoolean
	  contains(const RWCollectable* target) const;

     Inherited from class RWCollection.

	      virtual size_t
	  entries() const;

     Redefined from class RWCollection.

	      virtual RWCollectable*
	  find(const RWCollectable* target) const;

     Redefined from class RWCollection.	 Returns the first item that isEqual
     to the item pointed to by target, or nil if no item was found..

	      virtual RWCollectable*
	  first() const;

     Redefined from class RWSequenceable.  Returns the first item in the
     collection.

	      virtual unsigned
	  hash() const;

     Inherited from class RWCollectable.

	      virtual size_t
	  index(const RWCollectable*) const;

     Redefined from class RWSequenceable.

	      virtual RWCollectable*
	  insert(RWCollectable* c);

     Redefined from class RWCollection.	 Adds the item to the end of the
     collection and returns it.	 Returns nil if the insertion was

									Page 3

RWOrdered(3C++)						       RWOrdered(3C++)

     unsuccessful.

	      void
	  insertAt(size_t indx, RWCollectable* e);

     Redefined from class RWSequenceable.  Adds a new item to the collection
     at position indx.	The item previously at position i is moved to i+1,
     etc.  The index indx must be between 0 and the number of items in the
     collection, or an exception of type RWBoundsErr will be thrown.

	      virtual RWClassID
	  isA() const;

     Redefined from class RWCollectable to return __RWORDERED.

	      virtual RWBoolean
	  isEmpty() const;

     Redefined from class RWCollection.

	      virtual RWBoolean
	  isEqual(const RWCollectable* a) const;

     Inherited from class RWCollectable.

	      virtual RWCollectable*
	  last() const;

     Redefined from class RWSequenceable.  Returns the last item in the
     collection.

	      virtual size_t
	  occurrencesOf(const RWCollectable* target) const;

     Redefined from class RWCollection.	 Returns the number of items that
     compare isEqual to the item pointed to by target.

	      RWCollectable*
	  prepend(RWCollectable*);

     Redefined from class RWSequenceable.  Adds the item to the beginning of
     the collection and returns it.  Returns nil if the insertion was
     unsuccessful.

									Page 4

RWOrdered(3C++)						       RWOrdered(3C++)

	      void
	  push(RWCollectable* c);

     This is an alternative implementation of a stack to class
     RWSlistCollectablesStack.	The item pointed to by c is put at the end of
     the collection.

	      RWCollectable*
	  pop();

     This is an alternative implementation of a stack to class
     RWSlistCollectablesStack.	The last item in the collection is removed and
     returned.	If there are no items in the collection, nil is returned.

	      virtual RWCollectable*
	  remove(const RWCollectable* target);

     Redefined from class RWCollection.	 Removes the first item that isEqual
     to the item pointed to by target and returns it.  Returns nil if no item
     was found.

	      RWCollectable*
	  removeAt(size_t index);

     Removes the item at the position index in the collection and returns it.

	      virtual void
	  removeAndDestroy(const RWCollectable* target);

     Inherited from class RWCollection.

	      RWCollectable*
	  top() const;

     This is an alternative implementation of a stack to class
     RWSlistCollectablesStack.	The last item in the collection is returned.
     If there are no items in the collection, nil is returned.

									Page 5

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net