NAME

OTC_CtrVecPtr - Smart pointer to help manage resources.

SYNOPSIS


#include <OTC/refcnt/ctrvptr.hh>

template<class T>
class OTC_CtrVecPtr : public OTC_CCtrVecPtr<T>
{
  public:
    inline OTC_CtrVecPtr();
    inline OTC_CtrVecPtr(T* theItem);
    inline OTC_CtrVecPtr(OTC_CtrVecPtr<T> const& theCtrPtr);
    inline T* item() const;
    inline T& operator[](u_int theIndex) const;
    inline operator T*() const;
    inline T& operator*() const;
    inline OTC_CtrVecPtr<T>& operator=(
      OTC_CtrVecPtr<T> const& theCtrPtr
    );
    inline OTC_CtrVecPtr<T>& operator=(T* theItem);
};

CLASS TYPE

Concrete

DESCRIPTION

Designed to manage vectors of classes.

CONSTRUCTION

inline OTC_CtrVecPtr();
inline OTC_CtrVecPtr(T* theItem);
inline OTC_CtrVecPtr(OTC_CtrVecPtr<T> const& theCtrPtr);

ACCESS

inline T* item() const;
inline T& operator[](u_int theIndex) const;
inline operator T*() const;
inline T& operator*() const;

ASSIGNMENT

With all the following, the count on the currently held object will be decremented, and if it is no longer required, it will be deleted.
inline OTC_CtrVecPtr<T>& operator=(OTC_CtrVecPtr<T> const& theCtrPtr);
inline OTC_CtrVecPtr<T>& operator=(T* theItem);

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1991 OTC LIMITED
Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED