VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vlSmartPointers.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 MAK Technologies, Inc
3 ** All rights reserved.
4 ******************************************************************************/
13 #pragma once
14 
20 #ifndef BOOST_HAS_THREADS
21 #define BOOST_HAS_THREADS
22 #endif
23 
25 #include "boost_1_55/smart_ptr.hpp"
26 
29 namespace DtBoost = ::boost_1_55;
30 
31 #ifdef DtUSE_UTILITIES_NAMESPACE
32 namespace DtUSE_UTILITIES_NAMESPACE
33 {
34 #endif
35 
43 template <typename T>
44 bool DtValidAndEqual(const DtBoost::weak_ptr<T>& wp1,
45  const DtBoost::weak_ptr<T>& wp2)
46 {
47  DtBoost::shared_ptr<T> sp1 = wp1.lock();
48  DtBoost::shared_ptr<T> sp2 = wp2.lock();
49 
51  return (sp1 && sp2) && (sp1 == sp2);
52 }
53 
55 template <typename T>
65 bool DtValidAndEqual(const DtBoost::shared_ptr<T>& sp1,
66  const DtBoost::weak_ptr<T>& wp1)
67 {
68  DtBoost::shared_ptr<T> sp2 = wp1.lock();
70  return (sp2) && (sp1 == sp2);
71 }
72 
73 template <typename T>
74 bool DtValidAndEqual(const DtBoost::weak_ptr<T>& wp1,
75  const DtBoost::shared_ptr<T>& sp1)
76 {
77  DtBoost::shared_ptr<T> sp2 = wp1.lock();
79  return (sp2) && (sp1 == sp2);
80 }
82 
83 #ifdef DtUSE_UTILITIES_NAMESPACE
84 }
85 #endif
86 
87 
bool DtValidAndEqual(const DtBoost::weak_ptr< T > &wp1, const DtBoost::weak_ptr< T > &wp2)
Include boost version _1_55.
Definition: vlSmartPointers.h:44

Document ID: Generated on Wed Mar 27 02:04:30 EDT 2024 from SVN revision 264570
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)