1 #ifndef DataFormats_Common_fillPtrVector_h
2 #define DataFormats_Common_fillPtrVector_h
36 template <
typename COLLECTION>
39 std::type_info
const& iToType,
40 std::vector<unsigned long>
const& iIndicies,
41 std::vector<void const*>& oPtr)
43 typedef COLLECTION product_type;
45 typedef typename product_type::const_iterator
iter;
47 oPtr.reserve(iIndicies.size());
48 if(iToType ==
typeid(element_type)) {
49 for(std::vector<unsigned long>::const_iterator itIndex = iIndicies.begin(),
50 itEnd = iIndicies.end();
53 iter it = coll.begin();
54 std::advance(it, *itIndex);
56 oPtr.push_back(address);
61 for(std::vector<unsigned long>::const_iterator itIndex = iIndicies.begin(),
62 itEnd = iIndicies.end();
65 iter it = coll.begin();
66 std::advance(it, *itIndex);
73 "TypeConversionError "
74 "edm::PtrVector<> : unable to convert type ",
75 typeid(element_type).
name(),
85 template <
typename T,
typename A>
88 std::type_info
const& iToType,
89 std::vector<unsigned long>
const& iIndicies,
90 std::vector<void const*>& oPtr) {
94 template <
typename T,
typename A>
97 std::type_info
const& iToType,
98 std::vector<unsigned long>
const& iIndicies,
99 std::vector<void const*>& oPtr) {
103 template <
typename T,
typename A>
106 std::type_info
const& iToType,
107 std::vector<unsigned long>
const& iIndicies,
108 std::vector<void const*>& oPtr) {
112 template <
typename T,
typename A,
typename Comp>
115 std::type_info
const& iToType,
116 std::vector<unsigned long>
const& iIndicies,
117 std::vector<void const*>& oPtr) {
static const element_type * address(const iter &i)
void fillPtrVector(std::vector< T, A > const &obj, std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const * > &oPtr)
void const * pointerToBaseType(void const *ptr, TypeWithDict const &derivedType) const
static void throwThis(Code category, char const *message0="", char const *message1="", char const *message2="", char const *message3="", char const *message4="")
void reallyfillPtrVector(COLLECTION const &coll, std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const * > &oPtr)
COLLECTION::value_type element_type