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);
59 for(std::vector<unsigned long>::const_iterator itIndex = iIndicies.begin(),
60 itEnd = iIndicies.end();
63 iter it = coll.begin();
64 std::advance(it, *itIndex);
71 "TypeConversionError "
72 "edm::PtrVector<> : unable to convert type ",
73 typeid(element_type).
name(),
83 template <
typename T,
typename A>
86 std::type_info
const& iToType,
87 std::vector<unsigned long>
const& iIndicies,
88 std::vector<void const*>& oPtr) {
92 template <
typename T,
typename A>
95 std::type_info
const& iToType,
96 std::vector<unsigned long>
const& iIndicies,
97 std::vector<void const*>& oPtr) {
101 template <
typename T,
typename A>
104 std::type_info
const& iToType,
105 std::vector<unsigned long>
const& iIndicies,
106 std::vector<void const*>& oPtr) {
110 template <
typename T,
typename A,
typename Comp>
113 std::type_info
const& iToType,
114 std::vector<unsigned long>
const& iIndicies,
115 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)
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
void const * pointerToBase(std::type_info const &baseTypeInfo, T const *address)