MAK Data Logger API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
smartPointer.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #ifndef smartPointer_H_
10 #define smartPointer_H_
11 
12 #include <vlutil/vlSmartPointers.h>
13 
14 namespace MAKLogger
15 {
16 
17  template <typename T>
18  bool compareValidAndEqual(const DtBoost::weak_ptr<T>& wp1,const DtBoost::weak_ptr<T>& wp2)
19  {
20  DtBoost::shared_ptr<T> sp1 = wp1.lock();
21  DtBoost::shared_ptr<T> sp2 = wp2.lock();
22 
24  return (sp1 && sp2) && (sp1 == sp2);
25  }
26 
27  template <typename T>
28  bool compareValidAndEqual(const DtBoost::shared_ptr<T>& sp1,const DtBoost::weak_ptr<T>& wp1)
29  {
30  DtBoost::shared_ptr<T> sp2 = wp1.lock();
32  return (sp2) && (sp1 == sp2);
33  }
34 
35 }
36 
37 #endif
bool compareValidAndEqual(const DtBoost::weak_ptr< T > &wp1, const DtBoost::weak_ptr< T > &wp2)
Definition: smartPointer.h:18

Document ID: Generated on Mon Mar 22 15:30:17 EDT 2021 from SVN revision 226440
Copyright © 2021 MAK Technologies. All Rights Reserved (www.mak.com)