tut::test_group< Data, MaxTestsInGroup >::safe_holder< T > Class Template Reference

List of all members.

Public Member Functions

 safe_holder ()
 ~safe_holder ()
T * operator-> () const
T * get () const
void permit_throw ()
void release ()
void reset ()
bool delete_obj ()

Private Member Functions

 safe_holder (const safe_holder &)
safe_holderoperator= (const safe_holder &)

Private Attributes

T * p_
bool permit_throw_in_dtor

Detailed Description

template<class Data, int MaxTestsInGroup = 50>
template<class T>
class tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >

Exception-in-destructor-safe smart-pointer class.

Definition at line 550 of file tut.h.


Constructor & Destructor Documentation

template<class Data, int MaxTestsInGroup = 50>
template<class T>
tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::safe_holder ( const safe_holder< T > &   )  [private]

template<class Data, int MaxTestsInGroup = 50>
template<class T>
tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::safe_holder (  )  [inline]

Definition at line 559 of file tut.h.

template<class Data, int MaxTestsInGroup = 50>
template<class T>
tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::~safe_holder (  )  [inline]

Definition at line 563 of file tut.h.

References tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::release().

Here is the call graph for this function:


Member Function Documentation

template<class Data, int MaxTestsInGroup = 50>
template<class T>
bool tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::delete_obj (  )  [inline]

Definition at line 621 of file tut.h.

References tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::p_, and tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::permit_throw_in_dtor.

Referenced by tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::release().

template<class Data, int MaxTestsInGroup = 50>
template<class T>
T* tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::get (  )  const [inline]

Definition at line 569 of file tut.h.

References tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::p_.

Referenced by tut::test_group< Data, MaxTestsInGroup >::run_test_seh_().

template<class Data, int MaxTestsInGroup = 50>
template<class T>
T* tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::operator-> (  )  const [inline]

Definition at line 568 of file tut.h.

References tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::p_.

template<class Data, int MaxTestsInGroup = 50>
template<class T>
safe_holder& tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::operator= ( const safe_holder< T > &   )  [private]

template<class Data, int MaxTestsInGroup = 50>
template<class T>
void tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::permit_throw (  )  [inline]

Tell ptr it can throw from destructor. Right way is to use std::uncaught_exception(), but some compilers lack correct implementation of the function.

Definition at line 576 of file tut.h.

References tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::permit_throw_in_dtor.

Referenced by tut::test_group< Data, MaxTestsInGroup >::run_test_seh_().

template<class Data, int MaxTestsInGroup = 50>
template<class T>
void tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::release (  )  [inline]

Specially treats exceptions in test object destructor; if test itself failed, exceptions in destructor are ignored; if test was successful and destructor failed, warning exception throwed.

Definition at line 584 of file tut.h.

References tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::delete_obj(), and tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::permit_throw_in_dtor.

Referenced by tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::reset(), tut::test_group< Data, MaxTestsInGroup >::run_test_seh_(), and tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::~safe_holder().

Here is the call graph for this function:

template<class Data, int MaxTestsInGroup = 50>
template<class T>
void tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::reset (  )  [inline]

Re-init holder to get brand new object.

Definition at line 614 of file tut.h.

References tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::p_, tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::permit_throw_in_dtor, and tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::release().

Referenced by tut::test_group< Data, MaxTestsInGroup >::run_test_seh_().

Here is the call graph for this function:


Member Data Documentation

template<class Data, int MaxTestsInGroup = 50>
template<class T>
T* tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::p_ [private]

Definition at line 552 of file tut.h.

Referenced by tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::delete_obj(), tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::get(), tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::operator->(), and tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::reset().

template<class Data, int MaxTestsInGroup = 50>
template<class T>
bool tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::permit_throw_in_dtor [private]

Definition at line 553 of file tut.h.

Referenced by tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::delete_obj(), tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::permit_throw(), tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::release(), and tut::test_group< Data, MaxTestsInGroup >::safe_holder< T >::reset().


The documentation for this class was generated from the following file:
Generated on Fri Oct 26 13:35:18 2007 for FEMAXX (Finite Element Maxwell Eigensolver) by  doxygen 1.4.7