OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TAEnvelope< T > Class Template Reference

Envelope-letter type of smart pointer array. More...

#include <owl/pointer.h>

Public Member Functions

 TAEnvelope (T array[])
 
 TAEnvelope (const TAEnvelope &src)
 
 ~TAEnvelope ()
 
TAEnvelopeoperator= (const TAEnvelope &src)
 
TAEnvelopeoperator= (T array[])
 
T & operator[] (int i)
 
T * operator* ()
 

Detailed Description

template<class T>
class owl::TAEnvelope< T >

Envelope-letter type of smart pointer array.

In this implementation the envelope acts as a smart pointer to a reference-counted internal letter. This allows a lot of flexibility & safety in working with a single object (associated with the letter) being assigned to numerous envelopes in many scopes.

Use:

TAEnvelope<T> e1 = new T[99]; // e1 now owns T[] in a letter
e1[i].Func(); // invokes Func() on a T element
Func(e1[i]); // passing a T& or a T this way
TAEnvelope<T> e2 = e1; // e2 safely shares the letter with e1

Definition at line 297 of file pointer.h.

Constructor & Destructor Documentation

◆ TAEnvelope() [1/2]

template<class T >
owl::TAEnvelope< T >::TAEnvelope ( T array[])
inline

Definition at line 299 of file pointer.h.

◆ TAEnvelope() [2/2]

template<class T >
owl::TAEnvelope< T >::TAEnvelope ( const TAEnvelope< T > & src)
inline

Definition at line 300 of file pointer.h.

◆ ~TAEnvelope()

template<class T >
owl::TAEnvelope< T >::~TAEnvelope ( )
inline

Definition at line 301 of file pointer.h.

Member Function Documentation

◆ operator*()

template<class T >
T * owl::TAEnvelope< T >::operator* ( )
inline

Definition at line 307 of file pointer.h.

◆ operator=() [1/2]

template<class T >
TAEnvelope< T > & owl::TAEnvelope< T >::operator= ( const TAEnvelope< T > & src)

Definition at line 324 of file pointer.h.

◆ operator=() [2/2]

template<class T >
TAEnvelope< T > & owl::TAEnvelope< T >::operator= ( T array[])

Definition at line 335 of file pointer.h.

◆ operator[]()

template<class T >
T & owl::TAEnvelope< T >::operator[] ( int i)
inline

Definition at line 306 of file pointer.h.


The documentation for this class was generated from the following file: