NAME

OTC_VecPtr - Smart pointer to help manage resources.

SYNOPSIS


#include <OTC/memory/vecptr.hh>

template<class T>
class OTC_VecPtr
{
  public:
    inline OTC_VecPtr(u_int theSize);
    inline ~OTC_VecPtr();
    inline T* item();
    inline T const* item() const;
    inline T& operator[](u_int theIndex);
    inline T const& operator[](u_int theIndex) const;
    inline operator T*();
    inline operator T const*() const;
    inline T& operator*();
    inline T const& operator*() const;
    inline u_int size() const;
    inline OTC_Boolean isUndefined() const;
};

CLASS TYPE

Concrete

DESCRIPTION

Designed such that the array of objects being managed is only created when required. Also deletes the array of objects when the pointer class is destroyed.

CONSTRUCTION

inline OTC_VecPtr(u_int theSize);

DESTRUCTION

inline ~OTC_VecPtr();

ACCESS

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

QUERY

inline u_int size() const;
inline OTC_Boolean isUndefined() const;

LIBRARY

OTC

AUTHOR(S)

Graham Dumpleton

COPYRIGHT

Copyright 1994 DUMPLETON SOFTWARE CONSULTING PTY LIMITED