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

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 31 of file Wrapper.h.

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

Definition at line 32 of file Wrapper.h.

Constructor & Destructor Documentation

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

Definition at line 33 of file Wrapper.h.

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

Definition at line 272 of file Wrapper.h.

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

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

Definition at line 35 of file Wrapper.h.

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

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

Definition at line 287 of file Wrapper.h.

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

287  :
288  EDProduct(),
289  present(ptr != 0),
290  obj() {
291  std::auto_ptr<T> temp(ptr);
292  if (present) {
293  // The following will call swap if T has such a function,
294  // and use assignment if T has no such function.
296  DoSwap<T>,
297  DoAssign<T> >::type swap_or_assign;
298  swap_or_assign(obj, *ptr);
299  }
300 
301  }
type
Definition: HCALResponse.h:22
bool present
Definition: Wrapper.h:71
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 161 of file Wrapper.h.

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

163  {
165  DoSetPtr<T>,
166  DoNotSetPtr<T> >::type maybe_filler;
167  maybe_filler(this->obj,iToType,iIndices,oPtr);
168  }
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 105 of file Wrapper.h.

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

107  {
109  DoFillView<T>,
110  DoNotFillView<T> >::type maybe_filler;
111  maybe_filler(obj, id, pointers, helpers);
112  }
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 151 of file Wrapper.h.

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

153  {
155  DoSetPtr<T>,
156  DoNotSetPtr<T> >::type maybe_filler;
157  maybe_filler(this->obj,iToType,iIndex,oPtr);
158  }
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 49 of file Wrapper.h.

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

Reimplemented from edm::EDProduct.

Definition at line 323 of file Wrapper.h.

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

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

Reimplemented from edm::EDProduct.

Definition at line 305 of file Wrapper.h.

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

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

Reimplemented from edm::EDProduct.

Definition at line 48 of file Wrapper.h.

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

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

Reimplemented from edm::EDProduct.

Definition at line 331 of file Wrapper.h.

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

331  {
332  Wrapper<T> const* wrappedNewProduct = dynamic_cast<Wrapper<T> const*>(newProduct);
333  if (wrappedNewProduct == 0) return false;
335  DoIsProductEqual<T>,
336  DoNotIsProductEqual<T> >::type is_equal;
337  return is_equal(obj, wrappedNewProduct->obj);
338  }
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 313 of file Wrapper.h.

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

313  {
314  Wrapper<T> const* wrappedNewProduct = dynamic_cast<Wrapper<T> const*>(newProduct);
315  if (wrappedNewProduct == 0) return false;
317  DoMergeProduct<T>,
318  DoNotMergeProduct<T> >::type merge_product;
319  return merge_product(obj, wrappedNewProduct->obj);
320  }
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 37 of file Wrapper.h.

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

37 {return product();}
T const * product() const
Definition: Wrapper.h:36
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 40 of file Wrapper.h.

40 { return typeid(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 73 of file Wrapper.h.

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

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