home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tlx501.zip / VPARRAYS.H < prev    next >
C/C++ Source or Header  |  1996-01-05  |  21KB  |  563 lines

  1. /****************************************************************************
  2.     $Id: vparrays.h 501.0 1995/03/07 12:26:48 RON Exp $
  3.  
  4.     Copyright (c) 1993-95 Tarma Software Research. All rights reserved.
  5.  
  6.     Project:    Tarma Library for C++ V5.0
  7.     Author:    Ron van der Wal
  8.  
  9.     Declarations of classes that implement array-like collections of (void *):
  10.  
  11.     - TLVPVector
  12.     - TLVPArray
  13.     - TLVPSeq
  14.     - TLVPQueue
  15.     - TLVPStack
  16.     - TLVPSet
  17.  
  18.     Arrays of (void *) are useful in their own right, and as base for array
  19.     templates for other pointer types. Because (void *) and other pointers
  20.     do not have constructors and destructors, several operations can be
  21.     implemented significantly more efficiently than with a general
  22.     TLArray<T> template.
  23.  
  24.     $Log: vparrays.h $
  25.     Revision 501.0  1995/03/07 12:26:48  RON
  26.     Updated for TLX 5.01
  27.     Revision 1.8  1995/01/31 16:32:18  RON
  28.     Update for release 012
  29.     Added partial support for SunPro C++ compiler
  30.     Revision 1.7  1994/09/28  14:29:55  ron
  31.     Removed Macintosh-style #include references
  32.  
  33.     Revision 1.6  1994/09/27  20:25:57  ron
  34.     Changed path separator from / to \
  35.  
  36.     Revision 1.5  1994/09/26  15:25:51  ron
  37.     Renamed SetSize() functions to Resize()
  38.     Changed iterator functions for sets
  39.  
  40.     Revision 1.4  1994/09/07  15:34:58  ron
  41.     Corrected definitions of VPQueue::Enqueue() and Dequeue
  42.  
  43.     Revision 1.3  1994/09/06  20:23:40  ron
  44.     Small formatting changes
  45.  
  46.     Revision 1.2  1994/09/06  13:59:23  ron
  47.     Adapted to changes in tlx.h
  48.  
  49.     Revision 1.1  1994/08/16  18:06:56  ron
  50.     Initial revision
  51.  
  52. ****************************************************************************/
  53.  
  54. #ifndef _TLX_VPARRAYS_H
  55. #define _TLX_VPARRAYS_H
  56.  
  57. #ifndef _TLX_TLX_H
  58. #include <tlx\501\tlx.h>
  59. #endif
  60.  
  61. /*---------------------------------------------------------------------------
  62.     Auxiliary declarations
  63. ---------------------------------------------------------------------------*/
  64.  
  65. typedef int    (*tCompareFunc)(const void *, const void *);
  66. typedef void    (*tDeleteFunc)(void *);
  67.  
  68. /*---------------------------------------------------------------------------
  69.     TLVPVector -
  70.  
  71.     Class that implements a resizable vector of (void *). Indexing starts
  72.     at 0 and is range checked by default.
  73. ---------------------------------------------------------------------------*/
  74.  
  75. class _TLXCLASS TLVPVector
  76. {
  77.     void **        mVector;    // Points to vector storage
  78.     size_t        mSize;        // Number of elements
  79.     bool         mOwner;        // Nonzero if we own pointed to objects
  80.     tDeleteFunc        mDeleteFunc;    // Element deletion function
  81.  
  82. public:
  83.     // The following functions provide defaults for often-used functions.
  84.  
  85.     static int        DefaultCompare(const void *, const void *);
  86.     static void        DefaultDelete(void *);
  87.  
  88. public:
  89.     // Constructors to cater for the most common situations. Destructor
  90.     // cleans up.
  91.  
  92.     TLVPVector(size_t = 0);        // Creates sized vector; default = 0
  93.     TLVPVector(void *);            // Creates single element vector
  94.     TLVPVector(void **, size_t);        // Creates copy of C-style vector
  95.     TLVPVector(const TLVPVector &);    // Copies other vector
  96.     ~TLVPVector();
  97.  
  98.     // Assignment operators for common situations.
  99.  
  100.     TLVPVector &    operator =(const TLVPVector &);
  101.     TLVPVector &    operator =(void *);
  102.  
  103.     // Access to vector elements. We provide both range checked and
  104.     // direct access versions (for speed). The operator [] versions have
  105.     // range checking; the PeekAt() versions don't.
  106.  
  107.     void *&        operator [](index_t);
  108.     void *        operator [](index_t) const;
  109.     void *&        PeekAt(index_t);
  110.     void *        PeekAt(index_t) const;
  111.     index_t        IndexOf(const void *) const;
  112.  
  113.     // Clear all pointers in the vector, optionally deleting the pointed
  114.     // to objects.
  115.  
  116.     void        DeletePtr(void *);
  117.     tDeleteFunc        SetDelete(tDeleteFunc);
  118.     void        RemoveAll();
  119.     bool         BecomeOwner(bool = true);
  120.     bool         IsOwner() const { return mOwner; }
  121.  
  122.     // Information about the size of the vector; can be used to safely run
  123.     // through its elements. Also functions to change its size.
  124.  
  125.     index_t        Mini() const { return 0; }
  126.     index_t        Maxi() const { return mSize - 1; }
  127.     bool         IsValidIndex(index_t) const;
  128.     size_t        Size() const { return mSize; }
  129.     void        Resize(size_t);
  130.     static size_t    MaxSize() { return kMaxAlloc / sizeof(void *); }
  131.     void        ExpandBy(size_t);
  132.     void        ShrinkBy(size_t);
  133.  
  134.     // The following function gives access to the implementation vector.
  135.     // It should be used with care.
  136.  
  137.     void **        StorageVector() const { return mVector; }
  138.  
  139. private:
  140.     // Helper function for constructor and assignment.
  141.     void        Copy(size_t, void ** = 0);
  142. };
  143.  
  144. /*---------------------------------------------------------------------------
  145.     TLVPArray -
  146.  
  147.     Class that represents an array of (void *). Indexing may start at any
  148.     base; the array is resizable and reindexable. Indexed access is
  149.     range checked by default.
  150. ---------------------------------------------------------------------------*/
  151.  
  152. class _TLXCLASS TLVPArray
  153. {
  154.     TLVPVector        mVector;    // The actual storage
  155.     index_t        mBase;        // Index base
  156.  
  157. public:
  158.     // Constructors to cater for the most common situations. Destructor
  159.     // cleans up.
  160.  
  161.     TLVPArray(size_t = 0);        // Creates 0-based array; default = 0
  162.     TLVPArray(index_t, index_t);        // Creates array [from, to]
  163.     TLVPArray(void *);            // Creates single element array
  164.     TLVPArray(void **, size_t);        // Creates copy of C-style vector
  165.     TLVPArray(const TLVPArray &);    // Copies other array
  166.     virtual ~TLVPArray();
  167.  
  168.     // Assignment operators for common situations.
  169.  
  170.     TLVPArray &        operator =(const TLVPArray &);
  171.     TLVPArray &        operator =(void *);
  172.  
  173.     // Access to array elements. We provide both range checked and
  174.     // direct access versions (for speed). The operator [] versions have
  175.     // range checking; the PeekAt() versions don't and are implemented inline.
  176.  
  177.     void *&        operator [](index_t);
  178.     void *        operator [](index_t) const;
  179.     void *&        PeekAt(index_t);
  180.     void *        PeekAt(index_t) const;
  181.     index_t        IndexOf(const void *) const;
  182.  
  183.     // Clear all elements in the array.
  184.  
  185.     void        DeletePtr(void *aPtr) { mVector.DeletePtr(aPtr); }
  186.     tDeleteFunc        SetDelete(tDeleteFunc aFunc)
  187.                 { return mVector.SetDelete(aFunc); }
  188.     void        RemoveAll() { mVector.RemoveAll(); }
  189.     bool         BecomeOwner(bool aFlag = true)
  190.                     { return mVector.BecomeOwner(aFlag); }
  191.     bool         IsOwner() const { return mVector.IsOwner(); }
  192.  
  193.     // Information about the array; can be used to safely run through its
  194.     // elements.
  195.  
  196.     index_t        Mini() const { return mBase; }
  197.     index_t        Maxi() const;
  198.     bool         IsValidIndex(index_t) const;
  199.     size_t        Size() const { return mVector.Size(); }
  200.     static size_t    MaxSize() { return TLVPVector::MaxSize(); }
  201.  
  202.     // Functions to change the size and index base of the array.
  203.  
  204.     void        Resize(size_t);
  205.     void        ExpandBy(size_t);
  206.     void        ShrinkBy(size_t);
  207.     void        SetMini(index_t);
  208. };
  209.  
  210. /*---------------------------------------------------------------------------
  211.     TLVPSeq -
  212.  
  213.     Class that implements a resizable sequence of (void *). Elements can be
  214.     added at any place; access is by index (1-based), by position, or by
  215.     value.
  216. ---------------------------------------------------------------------------*/
  217.  
  218. class _TLXCLASS TLVPSeq
  219. {
  220.     TLVPVector        mVector;    // Actual vector
  221.     size_t        mCount;        // Number of elements used
  222.     size_t        mDelta;        // Amount of expansion
  223.     tCompareFunc    mCompare;    // Points to comparison function
  224.  
  225. public:
  226.     TLVPSeq(size_t = 0, size_t = 0);    // Creates initial size & expansion
  227.     TLVPSeq(void *);            // Single element sequence
  228.     TLVPSeq(void **, size_t);        // Copies C-style vector
  229.     TLVPSeq(const TLVPSeq &);        // Copy constructor
  230.     ~TLVPSeq();
  231.  
  232.     // Assignment operators.
  233.  
  234.     TLVPSeq &        operator =(const TLVPSeq &);
  235.     TLVPSeq &        operator =(void *);
  236.     TLVPSeq &        operator +=(const TLVPSeq &aSeq)
  237.                     { Append(aSeq); return *this; }
  238.     TLVPSeq &        operator +=(void *aPtr)
  239.                     { Append(aPtr); return *this; }
  240.  
  241.     // Insertion and removal of elements. Append() functions add the elements
  242.     // at the end of the sequence; Prepend() functions doe so at the start;
  243.     // the Insert() versions allow the user to specify the index for insertion.
  244.     // With the Replace() functions it is possible to replace parts of the
  245.     // sequence.
  246.  
  247.     void        Append(void *);
  248.     void        Append(void **, size_t);
  249.     void        Append(const TLVPSeq &);
  250.     void        Prepend(void *);
  251.     void        Prepend(void **, size_t);
  252.     void        Prepend(const TLVPSeq &);
  253.     void        InsertAt(index_t, void *);
  254.     void        InsertAt(index_t, void **, size_t);
  255.     void        InsertAt(index_t, const TLVPSeq &);
  256.     void        Insert(void *);
  257.     void        Replace(index_t, void *);
  258.     void        Replace(index_t, void **, size_t);
  259.     void        Replace(index_t, const TLVPSeq &);
  260.     void *        Extract(void *);
  261.     void *        Extract(index_t);
  262.     TLVPSeq        Extract(index_t, size_t);
  263.     void *        ExtractFirst();
  264.     TLVPSeq        ExtractFirst(size_t);
  265.     void *        ExtractLast();
  266.     TLVPSeq        ExtractLast(size_t);
  267.  
  268.     void        DeletePtr(void *aPtr) { mVector.DeletePtr(aPtr); }
  269.     tDeleteFunc        SetDelete(tDeleteFunc aFunc)
  270.                 { return mVector.SetDelete(aFunc); }
  271.     void        Remove(void *);
  272.     void        RemoveAt(index_t, size_t = 1);
  273.     void        RemoveFirst(size_t = 1);
  274.     void        RemoveLast(size_t = 1);
  275.     void        RemoveAll();
  276.     bool         BecomeOwner(bool aFlag = true)
  277.                     { return mVector.BecomeOwner(aFlag); }
  278.     bool         IsOwner() const { return mVector.IsOwner(); }
  279.  
  280.     // Indexed access to the elements. The operator [] versions are range
  281.     // checked, while the PeekAt() functions are not and are implemented inline
  282.     // for speed.
  283.  
  284.     void *&        operator [](index_t);
  285.     void *        operator [](index_t) const;
  286.     void *&        PeekAt(index_t);
  287.     void *        PeekAt(index_t) const;
  288.     void *&        PeekReverse(index_t);
  289.     void *        PeekReverse(index_t) const;
  290.     void *&        PeekFirst();
  291.     void *        PeekFirst() const;
  292.     void *&        PeekLast();
  293.     void *        PeekLast() const;
  294.  
  295.     // Searching and sorting function. Sort() (re-)sorts the sequence;
  296.     // Search() executes a binary search for an element. This assumes
  297.     // that the sequence is sorted at the time of the search.
  298.     // (The IndexOf() member function still performs a linear search
  299.     // which will work regardless of sorting order.)
  300.     //
  301.     // Collating order can be set by means of a function pointer.
  302.  
  303.     void        Sort();
  304.     bool         Search(const void *, index_t &) const;
  305.     index_t        IndexOf(const void *) const;
  306.     bool         Contains(const void *) const;
  307.     tCompareFunc    SetCompare(tCompareFunc);
  308.  
  309.     // Information about the characteristics of the sequence, and functions
  310.     // to change them.
  311.  
  312.     index_t        Mini() const { return 1; }
  313.     index_t        Maxi() const { return mCount; }
  314.     bool         IsValidIndex(index_t) const;
  315.     size_t        Size() const { return mVector.Size(); }
  316.     void        Resize(size_t);
  317.     static size_t    MaxSize() { return TLVPVector::MaxSize(); }
  318.     size_t        Count() const { return mCount; }
  319.     size_t        Available() const;
  320.     bool         IsEmpty() const { return Count() == 0; }
  321.     bool         IsFull() const { return Available() == 0; }
  322.     size_t        Delta() const { return mDelta; }
  323.     size_t        SetDelta(size_t);
  324.     void        CompactStorage() { Resize(mCount); }
  325.     size_t        Freeze() { return SetDelta(0); }
  326.     bool         IsFrozen() const { return mDelta == 0; }
  327.  
  328. private:
  329.     // Implementation helper functions
  330.     index_t        QPart(index_t, index_t);
  331.     void         QSort(index_t, index_t);
  332. };
  333.  
  334. /*---------------------------------------------------------------------------
  335.     TLVPQueue -
  336.  
  337.     Class that implements a resizable queue of (void *). The queue can be
  338.     used as an ordinary FIFO queue, or as a double-ended one.
  339. ---------------------------------------------------------------------------*/
  340.  
  341. class _TLXCLASS TLVPQueue
  342. {
  343.     TLVPVector        mVector;    // Actual vector
  344.     index_t        mLeft;        // Position of the left end
  345.     index_t        mRight;        // Position of the right end
  346.     size_t        mDelta;        // Amount of expansion
  347.     size_t        mCount;        // Number of items in the queue
  348.  
  349. public:
  350.     TLVPQueue(size_t = 0, size_t = 0);    // Creates initial size & expansion
  351.     TLVPQueue(void *);            // Single element sequence
  352.     TLVPQueue(void **, size_t);        // Copies C-style vector
  353.     TLVPQueue(const TLVPQueue &);    // Copy constructor
  354.  
  355.     // Assignment operators.
  356.  
  357.     TLVPQueue &        operator =(const TLVPQueue &);
  358.     TLVPQueue &        operator =(void *);
  359.  
  360.     // Insertion and removal of elements. For a double-ended queue:
  361.     //
  362.     // - AddLeft() and AddRight() add elements at either end
  363.     // - ExtractLeft() and ExtractRight() remove and return them
  364.     // - RemoveLeft() and RemoveRight() remove them
  365.     // - PeekLeft() and PeekRight() allow access to those elements
  366.  
  367.     void        AddLeft(void *);
  368.     void        AddRight(void *);
  369.     void *        ExtractLeft();
  370.     void *        ExtractRight();
  371.     void        RemoveLeft();
  372.     void        RemoveRight();
  373.     void *&        PeekLeft();
  374.     void *        PeekLeft() const;
  375.     void *&        PeekRight();
  376.     void *        PeekRight() const;
  377.  
  378.     // For FIFO queue treatment:
  379.     //
  380.     // - Enqueue() adds elements at the back end
  381.     // - Dequeue() removes and returns elements from the front end
  382.     // - PeekHead() and PeekTail() allow inspection
  383.  
  384.     void        Enqueue(void *aPtr) { AddRight(aPtr); }
  385.     void        EnqueueUnique(void *);
  386.     void *        Dequeue() { return ExtractLeft(); }
  387.     void *&        PeekHead() { return PeekLeft(); }
  388.     void *        PeekHead() const { return PeekLeft(); }
  389.     void *&        PeekTail() { return PeekRight(); }
  390.     void *        PeekTail() const { return PeekRight(); }
  391.  
  392.     // For additional flexibility, it is also possible to check for
  393.     // the presence of an element and remove it if necessary:
  394.     //
  395.     // - RemoveAll() discards all elements
  396.     // - Contains() checks for presence
  397.     // - Extract() removes and returns an element
  398.     // - Remove() removes an element
  399.  
  400.     void *        Extract(void *);
  401.     void        Remove(void *);
  402.     void        RemoveAll();
  403.     bool         Contains(void *) const;
  404.     void        DeletePtr(void *aPtr) { mVector.DeletePtr(aPtr); }
  405.     tDeleteFunc        SetDelete(tDeleteFunc aFunc)
  406.                 { return mVector.SetDelete(aFunc); }
  407.     bool         BecomeOwner(bool aFlag = true)
  408.                     { return mVector.BecomeOwner(aFlag); }
  409.     bool         IsOwner() const { return mVector.IsOwner(); }
  410.  
  411.     // Information about the characteristics of the queue, and functions
  412.     // to change them.
  413.  
  414.     size_t        Size() const { return mVector.Size(); }
  415.     void        Resize(size_t);
  416.     static size_t    MaxSize() { return TLVPVector::MaxSize(); }
  417.     size_t        Count() const;
  418.     bool         IsEmpty() const { return Count() == 0; }
  419.     bool         IsFull() const { return Count() == Size(); }
  420.     size_t        Available() const;
  421.     void        CompactStorage() { Resize(Count()); }
  422.     size_t        Delta() const { return mDelta; }
  423.     size_t        SetDelta(size_t);
  424.     size_t        Freeze() { return SetDelta(0); }
  425.     bool         IsFrozen() const { return mDelta == 0; }
  426.  
  427. private:
  428.     void        EnsureAvailable(size_t = 1);
  429. };
  430.  
  431. /*---------------------------------------------------------------------------
  432.     TLVPStack -
  433.  
  434.     Class that implements a resizable stack of (void *).
  435. ---------------------------------------------------------------------------*/
  436.  
  437. class _TLXCLASS TLVPStack
  438. {
  439.     TLVPSeq        mSeq;        // Actual storage
  440.  
  441. public:
  442.     TLVPStack(size_t = 0, size_t = 0);    // Creates initial size & expansion
  443.     TLVPStack(void *);            // Single element sequence
  444.     TLVPStack(void **, size_t);        // Copies C-style vector
  445.     TLVPStack(const TLVPStack &);    // Copy constructor
  446.  
  447.     // Assignment operators.
  448.  
  449.     TLVPStack &        operator =(const TLVPStack &);
  450.     TLVPStack &        operator =(void *);
  451.  
  452.     // Insertion and removal of elements is on a LIFO basis.
  453.  
  454.     void        Push(void *aPtr) { mSeq.Append(aPtr); }
  455.     void        Push(void **aVector, size_t aSize)
  456.                     { mSeq.Append(aVector, aSize); }
  457.     void *        Pop() { return mSeq.ExtractLast(); }
  458.     void *        Pop(void *aPtr) { return mSeq.Extract(aPtr); }
  459.     TLVPSeq        Pop(size_t aSize) { return mSeq.ExtractLast(aSize); }
  460.     void        Remove(void *aPtr) { mSeq.Remove(aPtr); }
  461.     void        RemoveTop() { mSeq.RemoveLast(); }
  462.     void        RemoveMany(size_t aCount) { mSeq.RemoveLast(aCount); }
  463.     void *&        PeekTop() { return mSeq.PeekLast(); }
  464.     void *        PeekTop() const { return mSeq.PeekLast(); }
  465.  
  466.     // A few extra member function for additional flexibility.
  467.  
  468.     void        RemoveAll() { mSeq.RemoveAll(); }
  469.     void        DeletePtr(void *aPtr) { mSeq.DeletePtr(aPtr); }
  470.     tDeleteFunc        SetDelete(tDeleteFunc aFunc)
  471.                 { return mSeq.SetDelete(aFunc); }
  472.     bool         Contains(void *aPtr) { return mSeq.Contains(aPtr); }
  473.     bool         BecomeOwner(bool aFlag = true)
  474.                     { return mSeq.BecomeOwner(aFlag); }
  475.     bool         IsOwner() const { return mSeq.IsOwner(); }
  476.  
  477.     // Information about the characteristics of the stack, and functions
  478.     // to change them.
  479.  
  480.     size_t        Size() const { return mSeq.Size(); }
  481.     void        Resize(size_t aSize) { mSeq.Resize(aSize); }
  482.     static size_t    MaxSize() { return TLVPVector::MaxSize(); }
  483.     void        CompactStorage() { mSeq.CompactStorage(); }
  484.     bool         IsEmpty() const { return mSeq.IsEmpty(); }
  485.     bool         IsFull() const { return mSeq.IsFull(); }
  486.     size_t        Count() const { return mSeq.Count(); }
  487.     size_t        Available() const { return mSeq.Available(); }
  488.     size_t        Delta() const { return mSeq.Delta(); }
  489.     size_t        SetDelta(size_t aDelta) { return mSeq.SetDelta(aDelta); }
  490.     size_t        Freeze() { return mSeq.Freeze(); }
  491.     bool         IsFrozen() const { return mSeq.IsFrozen(); }
  492. };
  493.  
  494. /*---------------------------------------------------------------------------
  495.     TLVPSet -
  496.  
  497.     Class that implements a set of (void *). Elements can be inserted and
  498.     removed.
  499. ---------------------------------------------------------------------------*/
  500.  
  501. class _TLXCLASS TLVPSet
  502. {
  503.     TLVPSeq        mSeq;        // Actual storage
  504.  
  505. public:
  506.     TLVPSet(size_t = 0, size_t = 0);    // Creates initial size & expansion
  507.     TLVPSet(void *);            // Single element set
  508.     TLVPSet(void **, size_t);        // Copies C-style vector
  509.     TLVPSet(const TLVPSet &);        // Copy constructor
  510.  
  511.     // Assignment operators.
  512.  
  513.     TLVPSet &        operator =(const TLVPSet &);
  514.     TLVPSet &        operator =(void *);
  515.     TLVPSet &        operator +=(const TLVPSet &aSeq)
  516.                     { Insert(aSeq); return *this; }
  517.     TLVPSet &        operator +=(void *aPtr)
  518.                  { Insert(aPtr); return *this; }
  519.  
  520.     // Insertion and removal of elements. Insert() adds an element; Remove()
  521.     // removes and returns it.
  522.  
  523.     void        Insert(void *aPtr) { mSeq.Append(aPtr); }
  524.     void        Insert(void **aVector, size_t aSize)
  525.                     { mSeq.Append(aVector, aSize); }
  526.     void        Insert(const TLVPSet &aSet)
  527.                     { mSeq.Append(aSet.mSeq); }
  528.     void *        Extract(void *aPtr) { return mSeq.Extract(aPtr); }
  529.     void        Remove(void *aPtr) { mSeq.Remove(aPtr); }
  530.  
  531.     bool         Contains(const void *aPtr) const
  532.                     { return mSeq.Contains(aPtr); }
  533.     void        RemoveAll() { mSeq.RemoveAll(); }
  534.     void        DeletePtr(void *aPtr) { mSeq.DeletePtr(aPtr); }
  535.     tDeleteFunc        SetDelete(tDeleteFunc aFunc)
  536.                 { return mSeq.SetDelete(aFunc); }
  537.  
  538.     // Information about the characteristics of the set, and functions
  539.     // to change them.
  540.  
  541.     size_t        Size() const { return mSeq.Size(); }
  542.     void        Resize(size_t aSize) { mSeq.Resize(aSize); }
  543.     static size_t    MaxSize() { return TLVPSeq::MaxSize(); }
  544.     size_t        Count() const { return mSeq.Count(); }
  545.     size_t        Available() const { return mSeq.Available(); }
  546.     size_t        Delta() const { return mSeq.Delta(); }
  547.     size_t        SetDelta(size_t aDelta) { return mSeq.SetDelta(aDelta); }
  548.     size_t        Freeze() { return mSeq.Freeze(); }
  549.     void        CompactStorage() { mSeq.CompactStorage(); }
  550.     bool         IsEmpty() const { return mSeq.IsEmpty(); }
  551.     bool         IsFull() const { return mSeq.IsFull(); }
  552.     bool         IsOwner() const { return mSeq.IsOwner(); }
  553.     bool         BecomeOwner(bool aFlag = true)
  554.                 { return mSeq.BecomeOwner(aFlag); }
  555.  
  556.     void *&        PeekAt(index_t i) { return mSeq.PeekAt(i); }
  557.     void *        PeekAt(index_t i) const { return mSeq.PeekAt(i); }
  558.     index_t        Mini() const { return mSeq.Mini(); }
  559.     index_t        Maxi() const { return mSeq.Maxi(); }
  560. };
  561.  
  562. #endif    // _TLX_VPARRAYS_H
  563.