IMngPointer

Use objects of the IMngPointer class as managed pointers for collections. Managed pointers keep a reference count for each referenced element. When the last managed pointer to the element is destructed, the element is automatically deleted.


IMngPointer - Member Functions and Data by Group

Constructors & Destructor

Construct or destruct a managed pointer object.


[view class]
~IMngPointer
public:
~IMngPointer()

Destructs the pointer and decrements the reference count of the referenced element. If the reference count is 0, the referenced element is deleted.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IMngPointer


Overload 1
public:
IMngPointer(Element*, IExplicitInit)

Constructs a pointer of the indicated type from a given C++ pointer. The reference count of the referenced element is set to 1.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
IMngPointer()

Constructs a pointer of the indicated type and initializes it with NULL.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 3
public:
IMngPointer(IMngPointer < Element > const&)

Constructs a new pointer and initializes it with the given pointer. The reference count of the referenced element is incremented by 1.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
operator =
public:
IMngPointer < Element >& operator =( IMngPointer < Element > const& )

Assigns the given pointer to this pointer. The reference count of the referenced element is incremented and the reference count of the previously referenced element is decremented.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Operators

Use these operators to access the element being managed by this object.


[view class]
operator *
public:
Element& operator *() const

Returns a reference to the object to which the pointer refers.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
operator ->
public:
Element* operator ->() const

Returns a C pointer to the object to which the pointer refers.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
operator Element *
public:
operator Element *() const

Implicitly converts this pointer to a C++ pointer.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IMngPointer - Inherited Member Functions and Data

Inherited Public Functions

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data