VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions
vlSmartPointers.h File Reference

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

Go to the source code of this file.

Macros

#define BOOST_HAS_THREADS
 Required so that shared pointers are thread safe. More...
 

Functions

template<typename T >
bool DtValidAndEqual (const DtBoost::weak_ptr< T > &wp1, const DtBoost::weak_ptr< T > &wp2)
 Include boost version _1_55. More...
 
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. More...
 
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. More...
 

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

Macro Definition Documentation

#define BOOST_HAS_THREADS

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

Function Documentation

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

Include boost version _1_55.

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 Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)