VR-Link API Documentation for HLA 1.3
Functions
vlSmartPointers.h File Reference

Includes Boost smart pointers and aliases the Boost namespace. More...

Go to the source code of this file.

Functions

template<typename T >
bool DtValidAndEqual (const DtBoost::weak_ptr< T > &wp1, const DtBoost::weak_ptr< T > &wp2)
 Required so that shared pointers are thread safe.
template<typename T >
bool DtValidAndEqual (const DtBoost::shared_ptr< T > &sp1, const DtBoost::weak_ptr< T > &wp1)
 Compare if a weak pointer is valid and equal to a shared pointer.
template<typename T >
bool DtValidAndEqual (const DtBoost::weak_ptr< T > &wp1, const DtBoost::shared_ptr< T > &sp1)
 Compare if a weak pointer is valid and equal to a shared pointer.

Detailed Description

Includes Boost smart pointers and aliases the Boost namespace.

Includes the necessary headers to to use Boost smart pointers. This file also aliases name space to allow explicit versioning. This allows vrlink's Boost libraries to coexist with other versions of Boost. In addition it provides utility functions for dealing with weak pointers. For more information please see http://www.boost.org


Function Documentation

template<typename T >
bool DtValidAndEqual ( const DtBoost::weak_ptr< T > &  wp1,
const DtBoost::weak_ptr< T > &  wp2 
)

Required so that shared pointers are thread safe.

Since shared pointers can be used, across library and thread boundaries safely. NOTE: This does not make the objects that they point reentrant or thread safe. For a detailed discussion of the thread safety of shared_ptr please see the Thread Safety section of the Boost, smart_ptr documentation on http://www.boost.org Include boost version _1_33 Alias boost namespace to DtBoost, this will allow VR-Link to change the boost library version without changing code, if code uses DtBoost namespace Compare if two weak pointers are both valid and equal.

Parameters:
wp1A weak pointer to type T.
wp2A weak pointer to type T.
Returns:
Whether both weak pointers are valid and point to the same memory.
Return values:
trueBoth weak pointers point to the same value.
falseBoth weak pointers point do not point to the same value or both may be invalid.
template<typename T >
bool DtValidAndEqual ( const DtBoost::shared_ptr< T > &  sp1,
const DtBoost::weak_ptr< T > &  wp1 
)

Compare if a weak pointer is valid and equal to a shared pointer.

Parameters:
sp1A shared pointer to type T.
wp1A weak pointer to type T.
Returns:
Whether the weak pointer is valid and points to the same memory as the shared pointer.
Return values:
trueThe weak pointer is valid and points to the same memory as the shared pointer.
falseEither the weak pointer is invalid or it points to different memory than the shared pointer.
template<typename T >
bool DtValidAndEqual ( const DtBoost::weak_ptr< T > &  wp1,
const DtBoost::shared_ptr< T > &  sp1 
)

Compare if a weak pointer is valid and equal to a shared pointer.

Parameters:
sp1A shared pointer to type T.
wp1A weak pointer to type T.
Returns:
Whether the weak pointer is valid and points to the same memory as the shared pointer.
Return values:
trueThe weak pointer is valid and points to the same memory as the shared pointer.
falseEither the weak pointer is invalid or it points to different memory than the shared pointer.

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)