CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
edm::Wrapper< T > Class Template Reference

#include <BasicHandle.h>

Inheritance diagram for edm::Wrapper< T >:
edm::EDProduct

Public Types

typedef T value_type
 
typedef T wrapped_type
 

Public Member Functions

T const * operator-> () const
 
T const * product () const
 
 Wrapper ()
 
 Wrapper (std::auto_ptr< T > ptr)
 
 Wrapper (T *)
 
virtual ~Wrapper ()
 
- Public Member Functions inherited from edm::EDProduct
std::type_info const & dynamicTypeInfo () const
 
 EDProduct ()
 
void fillPtrVector (std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const * > &oPtr) const
 
void fillView (ProductID const &id, std::vector< void const * > &view, helper_vector_ptr &helpers) const
 
bool hasIsProductEqual () const
 
bool isMergeable () const
 
bool isPresent () const
 
bool isProductEqual (EDProduct const *newProduct) const
 
bool mergeProduct (EDProduct const *newProduct)
 
void setPtr (std::type_info const &iToType, unsigned long iIndex, void const *&oPtr) const
 
virtual ~EDProduct ()
 

Static Public Member Functions

static std::type_info const & productTypeInfo ()
 
static std::type_info const & typeInfo ()
 

Private Member Functions

virtual void do_fillPtrVector (std::type_info const &iToType, std::vector< unsigned long > const &iIndices, std::vector< void const * > &oPtr) const
 
virtual void do_fillView (ProductID const &id, std::vector< void const * > &pointers, helper_vector_ptr &helpers) const
 
virtual void do_setPtr (std::type_info const &iToType, unsigned long iIndex, void const *&oPtr) const
 
virtual std::type_info const & dynamicTypeInfo_ () const
 
virtual bool hasIsProductEqual_ () const
 
virtual bool isMergeable_ () const
 
virtual bool isPresent_ () const
 
virtual bool isProductEqual_ (EDProduct const *newProduct) const
 
virtual bool mergeProduct_ (EDProduct const *newProduct)
 
Wrapper< T > & operator= (Wrapper< T > const &)
 
 Wrapper (Wrapper< T > const &rh)
 

Private Attributes

T obj
 
bool present
 

Detailed Description

template<typename T>
class edm::Wrapper< T >

Definition at line 39 of file BasicHandle.h.

Member Typedef Documentation

template<typename T>
typedef T edm::Wrapper< T >::value_type

Definition at line 30 of file Wrapper.h.

template<typename T>
typedef T edm::Wrapper< T >::wrapped_type

Definition at line 31 of file Wrapper.h.

Constructor & Destructor Documentation

template<typename T>
edm::Wrapper< T >::Wrapper ( )
inline

Definition at line 32 of file Wrapper.h.

32 : EDProduct(), present(false), obj() {}
bool present
Definition: Wrapper.h:70
template<typename T >
edm::Wrapper< T >::Wrapper ( std::auto_ptr< T ptr)
explicit

Definition at line 271 of file Wrapper.h.

References edm::Wrapper< T >::obj, edm::Wrapper< T >::present, and relativeConstraints::value.

271  :
272  EDProduct(),
273  present(ptr.get() != 0),
274  obj() {
275  if (present) {
276  // The following will call swap if T has such a function,
277  // and use assignment if T has no such function.
279  DoSwap<T>,
280  DoAssign<T> >::type swap_or_assign;
281  swap_or_assign(obj, *ptr);
282  }
283  }
type
Definition: HCALResponse.h:22
bool present
Definition: Wrapper.h:70
template<typename T>
virtual edm::Wrapper< T >::~Wrapper ( )
inlinevirtual

Definition at line 34 of file Wrapper.h.

34 {}
template<typename T >
edm::Wrapper< T >::Wrapper ( T ptr)

REFLEX must call the following constructor the constructor takes ownership of T*

Definition at line 286 of file Wrapper.h.

References edm::Wrapper< T >::obj, edm::Wrapper< T >::present, cond::rpcobtemp::temp, and relativeConstraints::value.

286  :
287  EDProduct(),
288  present(ptr != 0),
289  obj() {
290  std::auto_ptr<T> temp(ptr);
291  if (present) {
292  // The following will call swap if T has such a function,
293  // and use assignment if T has no such function.
295  DoSwap<T>,
296  DoAssign<T> >::type swap_or_assign;
297  swap_or_assign(obj, *ptr);
298  }
299 
300  }
type
Definition: HCALResponse.h:22
bool present
Definition: Wrapper.h:70
template<typename T>
edm::Wrapper< T >::Wrapper ( Wrapper< T > const &  rh)
private

Member Function Documentation

template<typename T >
void edm::Wrapper< T >::do_fillPtrVector ( std::type_info const &  iToType,
std::vector< unsigned long > const &  iIndices,
std::vector< void const * > &  oPtr 
) const
privatevirtual

Implements edm::EDProduct.

Definition at line 160 of file Wrapper.h.

References VarParsing::obj, and relativeConstraints::value.

162  {
164  DoSetPtr<T>,
165  DoNotSetPtr<T> >::type maybe_filler;
166  maybe_filler(this->obj,iToType,iIndices,oPtr);
167  }
type
Definition: HCALResponse.h:22
template<typename T >
void edm::Wrapper< T >::do_fillView ( ProductID const &  id,
std::vector< void const * > &  pointers,
helper_vector_ptr helpers 
) const
inlineprivatevirtual

Implements edm::EDProduct.

Definition at line 104 of file Wrapper.h.

References VarParsing::obj, and relativeConstraints::value.

106  {
108  DoFillView<T>,
109  DoNotFillView<T> >::type maybe_filler;
110  maybe_filler(obj, id, pointers, helpers);
111  }
type
Definition: HCALResponse.h:22
template<typename T >
void edm::Wrapper< T >::do_setPtr ( std::type_info const &  iToType,
unsigned long  iIndex,
void const *&  oPtr 
) const
inlineprivatevirtual

Implements edm::EDProduct.

Definition at line 150 of file Wrapper.h.

References VarParsing::obj, and relativeConstraints::value.

152  {
154  DoSetPtr<T>,
155  DoNotSetPtr<T> >::type maybe_filler;
156  maybe_filler(this->obj,iToType,iIndex,oPtr);
157  }
type
Definition: HCALResponse.h:22
template<typename T>
virtual std::type_info const& edm::Wrapper< T >::dynamicTypeInfo_ ( ) const
inlineprivatevirtual

Implements edm::EDProduct.

Definition at line 48 of file Wrapper.h.

48 { return typeid(T);}
long double T
template<typename T >
bool edm::Wrapper< T >::hasIsProductEqual_ ( ) const
privatevirtual

Reimplemented from edm::EDProduct.

Definition at line 322 of file Wrapper.h.

References VarParsing::obj, and relativeConstraints::value.

322  {
324  DoHasIsProductEqual<T>,
325  DoNotHasIsProductEqual<T> >::type has_is_equal;
326  return has_is_equal(obj);
327  }
type
Definition: HCALResponse.h:22
template<typename T >
bool edm::Wrapper< T >::isMergeable_ ( ) const
privatevirtual

Reimplemented from edm::EDProduct.

Definition at line 304 of file Wrapper.h.

References VarParsing::obj, and relativeConstraints::value.

304  {
306  IsMergeable<T>,
307  IsNotMergeable<T> >::type is_mergeable;
308  return is_mergeable(obj);
309  }
type
Definition: HCALResponse.h:22
template<typename T>
virtual bool edm::Wrapper< T >::isPresent_ ( ) const
inlineprivatevirtual

Reimplemented from edm::EDProduct.

Definition at line 47 of file Wrapper.h.

References edm::Wrapper< T >::present.

47 {return present;}
bool present
Definition: Wrapper.h:70
template<typename T >
bool edm::Wrapper< T >::isProductEqual_ ( EDProduct const *  newProduct) const
privatevirtual

Reimplemented from edm::EDProduct.

Definition at line 330 of file Wrapper.h.

References compareJSON::const, VarParsing::obj, and relativeConstraints::value.

330  {
331  Wrapper<T> const* wrappedNewProduct = dynamic_cast<Wrapper<T> const*>(newProduct);
332  if (wrappedNewProduct == 0) return false;
334  DoIsProductEqual<T>,
335  DoNotIsProductEqual<T> >::type is_equal;
336  return is_equal(obj, wrappedNewProduct->obj);
337  }
type
Definition: HCALResponse.h:22
string const
Definition: compareJSON.py:14
template<typename T >
bool edm::Wrapper< T >::mergeProduct_ ( EDProduct const *  newProduct)
privatevirtual

Reimplemented from edm::EDProduct.

Definition at line 312 of file Wrapper.h.

References compareJSON::const, VarParsing::obj, and relativeConstraints::value.

312  {
313  Wrapper<T> const* wrappedNewProduct = dynamic_cast<Wrapper<T> const*>(newProduct);
314  if (wrappedNewProduct == 0) return false;
316  DoMergeProduct<T>,
317  DoNotMergeProduct<T> >::type merge_product;
318  return merge_product(obj, wrappedNewProduct->obj);
319  }
type
Definition: HCALResponse.h:22
string const
Definition: compareJSON.py:14
template<typename T>
T const* edm::Wrapper< T >::operator-> ( ) const
inline

Definition at line 36 of file Wrapper.h.

References edm::Wrapper< T >::product().

36 {return product();}
T const * product() const
Definition: Wrapper.h:35
template<typename T>
Wrapper<T>& edm::Wrapper< T >::operator= ( Wrapper< T > const &  )
private
template<typename T>
T const* edm::Wrapper< T >::product ( ) const
inline
template<typename T>
static std::type_info const& edm::Wrapper< T >::productTypeInfo ( )
inlinestatic

Definition at line 39 of file Wrapper.h.

39 { return typeid(T);}
long double T
template<typename T>
static std::type_info const& edm::Wrapper< T >::typeInfo ( )
inlinestatic

Member Data Documentation

template<typename T>
T edm::Wrapper< T >::obj
private

Definition at line 72 of file Wrapper.h.

Referenced by edm::Wrapper< T >::product(), and edm::Wrapper< T >::Wrapper().

template<typename T>
bool edm::Wrapper< T >::present
private