#include <AutoPtr.h>
Public Methods | |
AutoPtr () throw () | |
AutoPtr (COUNTED *pImpl) throw () | |
AutoPtr (const AutoPtr &ptr) throw () | |
~AutoPtr () throw () | |
AutoPtr& | operator= (const AutoPtr &ptr) throw () |
COUNTED* | operator-> () throw () |
const COUNTED* | operator-> () const throw () |
This is a class wide lock. In otherwords, all AutoPtr<MyClass> objects are locked with the same Mutex no matter how many actual MyClass implementations are being used.
Implementation level locking would be possible to implement - but would not be practical for a large number of objects.
Its recommended that use the AutoPtr() default constructor to avoid accidental double assignment & deletion errors.
|
Create a new COUNTED reference from the default constructor |
|
Create a new AutoPtr from an existing COUNTED reference The use of this constructor is really discouraged. Possible candidate for deprecation. The absence of this method would allow for a streamlined way to lock at implementation level rather than class level - However, for a large number of implementations this will not be practical. So class level locking is used for now
|
|
Create a new AutoPtr from another AutoPtr
|
|
Destroy the AutoPtr and check for release of the implementation |
|
Get a reference to the underlying implementation |
|
Get a reference to the underlying implementation |
|
Assignment
|