CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

testSharedPtrBasic.cc File Reference

#include "CLHEP/Utility/noncopyable.h"
#include "CLHEP/Utility/memory.h"
#include <cassert>

Go to the source code of this file.

Classes

struct  X
struct  Y

Functions

int * get_object ()
void release_object (int *p)
template<class T>
void test_is_X (shared_ptr< T > const &p)
template<class T>
void test_is_X (weak_ptr< T > const &p)
template<class T>
void test_is_Y (shared_ptr< T > const &p)
template<class T>
void test_is_Y (weak_ptr< T > const &p)
template<class T>
void test_eq (T const &a, T const &b)
template<class T>
void test_ne (T const &a, T const &b)
template<class T, class U>
void test_shared (weak_ptr< T > const &a, weak_ptr< U > const &b)
template<class T, class U>
void test_nonshared (weak_ptr< T > const &a, weak_ptr< U > const &b)
template<class T, class U>
void test_eq2 (T const &a, U const &b)
template<class T, class U>
void test_ne2 (T const &a, U const &b)
template<class T>
void test_is_zero (shared_ptr< T > const &p)
template<class T>
void test_is_nonzero (shared_ptr< T > const &p)
int main ()

Variables

int cnt = 0


Function Documentation

int* get_object (  ) 

Definition at line 41 of file testSharedPtrBasic.cc.

References cnt.

Referenced by main().

int main (  ) 

Definition at line 142 of file testSharedPtrBasic.cc.

References cnt, CLHEP::weak_ptr< P >::expired(), get_object(), CLHEP::weak_ptr< P >::lock(), release_object(), CLHEP::shared_ptr< P >::reset(), test_eq(), test_eq2(), test_is_nonzero(), test_is_X(), test_is_Y(), test_is_zero(), test_ne(), test_ne2(), test_nonshared(), test_shared(), CLHEP::weak_ptr< P >::use_count(), and CLHEP::shared_ptr< P >::use_count().

void release_object ( int *  p  ) 

Definition at line 44 of file testSharedPtrBasic.cc.

References cnt.

Referenced by main().

template<class T>
void test_eq ( T const &  a,
T const &  b 
)

Definition at line 80 of file testSharedPtrBasic.cc.

Referenced by main().

template<class T, class U>
void test_eq2 ( T const &  a,
U const &  b 
)

Definition at line 112 of file testSharedPtrBasic.cc.

Referenced by main().

template<class T>
void test_is_nonzero ( shared_ptr< T > const &  p  ) 

Definition at line 133 of file testSharedPtrBasic.cc.

References CLHEP::shared_ptr< P >::get().

Referenced by main().

template<class T>
void test_is_X ( weak_ptr< T > const &  p  ) 

Definition at line 58 of file testSharedPtrBasic.cc.

template<class T>
void test_is_X ( shared_ptr< T > const &  p  ) 

Definition at line 51 of file testSharedPtrBasic.cc.

Referenced by main().

template<class T>
void test_is_Y ( weak_ptr< T > const &  p  ) 

Definition at line 72 of file testSharedPtrBasic.cc.

References CLHEP::shared_ptr< P >::get(), and CLHEP::weak_ptr< P >::lock().

template<class T>
void test_is_Y ( shared_ptr< T > const &  p  ) 

Definition at line 65 of file testSharedPtrBasic.cc.

Referenced by main().

template<class T>
void test_is_zero ( shared_ptr< T > const &  p  ) 

Definition at line 126 of file testSharedPtrBasic.cc.

References CLHEP::shared_ptr< P >::get().

Referenced by main().

template<class T>
void test_ne ( T const &  a,
T const &  b 
)

Definition at line 89 of file testSharedPtrBasic.cc.

Referenced by main().

template<class T, class U>
void test_ne2 ( T const &  a,
U const &  b 
)

Definition at line 119 of file testSharedPtrBasic.cc.

Referenced by main().

template<class T, class U>
void test_nonshared ( weak_ptr< T > const &  a,
weak_ptr< U > const &  b 
)

Definition at line 105 of file testSharedPtrBasic.cc.

References a, and b.

Referenced by main().

template<class T, class U>
void test_shared ( weak_ptr< T > const &  a,
weak_ptr< U > const &  b 
)

Definition at line 98 of file testSharedPtrBasic.cc.

References a, and b.

Referenced by main().


Variable Documentation

int cnt = 0

Definition at line 26 of file testSharedPtrBasic.cc.

Referenced by get_object(), main(), release_object(), X::X(), Y::Y(), X::~X(), and Y::~Y().


Generated on 15 Nov 2012 for CLHEP by  doxygen 1.4.7