CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
WrapperOwningHolder.cc
Go to the documentation of this file.
2 
3 namespace edm {
6  if(wrapper != 0) {
7  interface_->deleteProduct(wrapper);
8  }
9  }
10 
12 
13  WrapperOwningHolder::WrapperOwningHolder(boost::shared_ptr<void const> wrapper, WrapperInterfaceBase const* interface) :
14  WrapperHolder(wrapper.get(), interface), wrapperOwner_(wrapper) {
15  }
16 
18  WrapperHolder(wrapper, interface),
19  wrapperOwner_(makeWrapper(wrapper, interface)) {
20  }
21 
22  boost::shared_ptr<void const>
24  return(boost::shared_ptr<void const>(wrapper, EDProductDeleter(interface)));
25  }
26 
27 }
boost::shared_ptr< void const > makeWrapper(void const *wrapper, WrapperInterfaceBase const *interface)
WrapperInterfaceBase const * interface_
Definition: WrapperHolder.h:91
boost::shared_ptr< void const > wrapperOwner_
EDProductDeleter(WrapperInterfaceBase const *interface)
void operator()(void const *wrapper) const
void deleteProduct(void const *me) const
void const * wrapper() const
Definition: WrapperHolder.h:76
T get(const Candidate &c)
Definition: component.h:56
static HepMC::HEPEVT_Wrapper wrapper