CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/DataFormats/Provenance/src/WrapperInterfaceBase.cc

Go to the documentation of this file.
00001 /*----------------------------------------------------------------------
00002 
00003 ----------------------------------------------------------------------*/
00004 
00005 #include "DataFormats/Provenance/interface/WrapperInterfaceBase.h"
00006 #include "DataFormats/Provenance/interface/ProductID.h"
00007 #include <cassert>
00008 
00009 namespace edm {
00010   WrapperInterfaceBase::WrapperInterfaceBase() {}
00011 
00012   WrapperInterfaceBase::~WrapperInterfaceBase() {}
00013 
00014   void WrapperInterfaceBase::fillView(void const* me,
00015                                       ProductID const& id,
00016                                       std::vector<void const*>& pointers,
00017                                       helper_vector_ptr& helpers) const {
00018     // This should never be called with non-empty arguments, or an
00019     // invalid ID; any attempt to do so is an indication of a coding
00020     // error.
00021     assert(id.isValid());
00022     assert(pointers.empty());
00023     assert(helpers.get() == 0);
00024 
00025     do_fillView(me, id, pointers, helpers);
00026   }
00027 
00028   void WrapperInterfaceBase::setPtr(void const* me,
00029                                     std::type_info const& iToType,
00030                                     unsigned long iIndex,
00031                                     void const*& oPtr) const {
00032     do_setPtr(me, iToType, iIndex, oPtr);
00033   }
00034 
00035   void
00036   WrapperInterfaceBase::fillPtrVector(void const* me,
00037                                       std::type_info const& iToType,
00038                                       std::vector<unsigned long> const& iIndicies,
00039                                       std::vector<void const*>& oPtr) const {
00040     do_fillPtrVector(me, iToType, iIndicies, oPtr);
00041   }
00042 }