Visit Platform at http://www.platform.com

Main Page   Class Hierarchy   Compound List   Compound Members  

SoamSmartPtr Class Template Reference

Smart pointer template. More...

List of all members.


Public Methods

T * operator-> () const
 This operator makes it possible for the developer to access the smart pointer as if it were the actual API object.

bool isNull () const
 test for null.

void setNull ()
 sets the internal reference of the smart pointer to null.

SoamSmartPtr< T > & operator= (SoamSmartPtr< T > other)
 Assigns a reference to the object being pointed to by the smart pointer presented.

SoamSmartPtr< T > & operator= (T *obj)
 Assigns a reference to the object being pointed to by the raw pointer presented.

bool operator== (const SoamSmartPtr< T > &a) const
 This operator allows the developer to compare references from two different smart pointers.

bool operator!= (const SoamSmartPtr< T > &a) const
 This operator allows the developer to compare references from two different smart pointers.


Detailed Description

template<class T>
class SoamSmartPtr< T >

Smart pointer template.

The C++ API attempts to make the memory management of all objects created by the API as seamless as possible for the developer. This means memory management is done automatically when the developer stores any object created by the API in a smart pointer of the appropriate type. The developer can directly access methods and attributes on an object through its corresponding smart pointer. The names of all smart pointer classes will generally take the form ClassNamePtr. For example, the smart pointer associated with the Connection class will have the name ConnectionPtr.

The usage of various smart pointers is best demonstrated in the C++ samples.

NOTE: The developer is still responsible for managing the lifecycle of any objects that are created by the application itself.


Member Function Documentation

T* operator->   const
 

This operator makes it possible for the developer to access the smart pointer as if it were the actual API object.

Returns:
a reference to the API object.

bool isNull   const
 

test for null.

Tests if the internal reference of the smart pointer is null.

Returns:
true if the internal reference is null and false otherwise.

void setNull  
 

sets the internal reference of the smart pointer to null.

SoamSmartPtr<T>& operator= SoamSmartPtr< T >    other
 

Assigns a reference to the object being pointed to by the smart pointer presented.

The current reference will be cleaned up automatically during the assignment.

SoamSmartPtr<T>& operator= T *    obj
 

Assigns a reference to the object being pointed to by the raw pointer presented.

The current reference will be cleaned up automatically during the assignment.

bool operator== const SoamSmartPtr< T > &    a const
 

This operator allows the developer to compare references from two different smart pointers.

This test is for equality.

Returns:
true if both smart pointers point to the same API object, false otherwise.

bool operator!= const SoamSmartPtr< T > &    a const
 

This operator allows the developer to compare references from two different smart pointers.

This test is for in-equality.

Returns:
true if both smart pointers point to different API object, false otherwise.


     
Date Modified: 11 Nov 2009
Platform Support: support@platform.com
Platform Information Development: doc@platform.com

Platform Computing. Accelerating Intelligence(TM).
Copyright © 2001-2009 Platform Computing Corporation. All rights reserved.