home *** CD-ROM | disk | FTP | other *** search
- #ifndef __RWTPVECTOR_H__
- #define __RWTPVECTOR_H__
- pragma push_align_members(64);
-
- /*
- * RWTPtrVector: Parameterized vector of pointers to T
- *
- * $Header: E:/vcs/rw/tpvector.h_v 1.0 19 Mar 1992 10:33:10 KEFFER $
- *
- ****************************************************************************
- *
- * Rogue Wave Software, Inc.
- * P.O. Box 2328
- * Corvallis, OR 97339
- *
- * Copyright (C) 1992. This software is subject to copyright
- * protection under the laws of the United States and other countries.
- *
- ***************************************************************************
- *
- * Stores a *pointer* to the item in the vector.
- *
- ***************************************************************************
- *
- * $Log: E:/vcs/rw/tpvector.h_v $
- *
- * Rev 1.0 19 Mar 1992 10:33:10 KEFFER
- * Initial revision.
- */
-
- //$DECLARE_TEMPLATE
-
- #include "rw/tvvector.h"
-
- template<class T> class RWTPtrVector : private RWTValVector<T*> {
-
- typedef RWTValVector<T*> BASE;
-
- public:
-
- RWTPtrVector() { }
- RWTPtrVector(unsigned n) : RWTValVector<T*>(n) { }
- RWTPtrVector(unsigned n, T* ival) : RWTValVector<T*>(n, ival) { }
-
- RWTPtrVector& operator=(const RWTPtrVector& v) { BASE::operator=(v); return *this; }
-
- BASE::data;
- BASE::length;
- BASE::reshape;
- void resize(unsigned N);
- BASE::operator();
- BASE::operator[];
- };
-
- template <class T> void
- RWTPtrVector<T>::resize(unsigned N)
- {
- unsigned oldN=length();
- reshape(N);
- for (int i=oldN; i<N; i++)
- (*this)(i) = rwnil;
- }
-
- pragma pop_align_members();
- #endif /* __RWTPVECTOR_H__ */
-