1 #ifndef DataFormats_Common_setPtr_h 2 #define DataFormats_Common_setPtr_h 35 template <
typename COLLECTION>
38 std::type_info
const& iToType,
41 typedef COLLECTION product_type;
43 typedef typename product_type::const_iterator iter;
45 if(iToType ==
typeid(element_type)) {
46 iter it = coll.begin();
47 std::advance(it,iIndex);
51 iter it = coll.begin();
52 std::advance(it,iIndex);
60 "edm::Ptr<> : unable to convert type ",
61 typeid(element_type).
name(),
70 template <
typename T,
typename A>
73 std::type_info
const& iToType,
79 template <
typename T,
typename A>
82 std::type_info
const& iToType,
88 template <
typename T,
typename A>
91 std::type_info
const& iToType,
97 template <
typename T,
typename A,
typename Comp>
100 std::type_info
const& iToType,
101 unsigned long iIndex,
static const element_type * address(const iter &i)
void setPtr(std::vector< T, A > const &obj, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr)
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
COLLECTION::value_type element_type
void reallySetPtr(COLLECTION const &coll, std::type_info const &iToType, unsigned long iIndex, void const *&oPtr)
void const * pointerToBase(std::type_info const &baseTypeInfo, T const *address)