CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes | Friends

fwlite::ESHandle< T > Class Template Reference

#include <ESHandle.h>

List of all members.

Public Member Functions

 ESHandle ()
bool isValid () const
const Toperator* () const
const Toperator-> () const
const std::type_info & typeInfo () const

Private Member Functions

 ESHandle (const void *iData)
 ESHandle (cms::Exception *iException)

Private Attributes

const Tm_data
boost::shared_ptr< cms::Exceptionm_exception

Friends

class fwlite::Record

Detailed Description

template<class T>
class fwlite::ESHandle< T >

Definition at line 37 of file ESHandle.h.


Constructor & Destructor Documentation

template<class T>
fwlite::ESHandle< T >::ESHandle ( ) [inline]

Definition at line 42 of file ESHandle.h.

template<class T>
fwlite::ESHandle< T >::ESHandle ( const void *  iData) [inline, private]

Definition at line 70 of file ESHandle.h.

                                  :
         m_data(static_cast<const T*>(iData)),
         m_exception() {}
template<class T>
fwlite::ESHandle< T >::ESHandle ( cms::Exception iException) [inline, private]

Definition at line 73 of file ESHandle.h.

                                         :
         m_data(0), m_exception(iException) {}

Member Function Documentation

template<class T>
bool fwlite::ESHandle< T >::isValid ( void  ) const [inline]

Definition at line 45 of file ESHandle.h.

References fwlite::ESHandle< T >::m_data.

Referenced by main().

{ return 0!=m_data;}
template<class T>
const T& fwlite::ESHandle< T >::operator* ( ) const [inline]

Definition at line 47 of file ESHandle.h.

References fwlite::ESHandle< T >::m_data, and fwlite::ESHandle< T >::m_exception.

                                 {
         if(0!=m_exception.get()) {
            throw *m_exception;
         }
         return *m_data;
      }
template<class T>
const T* fwlite::ESHandle< T >::operator-> ( ) const [inline]

Definition at line 54 of file ESHandle.h.

References fwlite::ESHandle< T >::m_data, and fwlite::ESHandle< T >::m_exception.

                                  {
         if(0!=m_exception.get()) {
            throw *m_exception;
         }
         return m_data;
         
      }
template<class T>
const std::type_info& fwlite::ESHandle< T >::typeInfo ( ) const [inline]

Definition at line 62 of file ESHandle.h.

                                           {
         return typeid(T);
      }

Friends And Related Function Documentation

template<class T>
friend class fwlite::Record [friend]

Definition at line 39 of file ESHandle.h.


Member Data Documentation

template<class T>
const T* fwlite::ESHandle< T >::m_data [private]
template<class T>
boost::shared_ptr<cms::Exception> fwlite::ESHandle< T >::m_exception [private]