1 #ifndef DataFormats_Common_fillPtrVector_h 2 #define DataFormats_Common_fillPtrVector_h 36 template <
typename COLLECTION>
38 std::type_info
const& iToType,
39 std::vector<unsigned long>
const& iIndicies,
40 std::vector<void const*>& oPtr) {
41 typedef COLLECTION product_type;
43 typedef typename product_type::const_iterator iter;
45 oPtr.reserve(iIndicies.size());
46 if (iToType ==
typeid(element_type)) {
47 for (std::vector<unsigned long>::const_iterator itIndex = iIndicies.begin(), itEnd = iIndicies.end();
50 iter it = coll.begin();
51 std::advance(it, *itIndex);
53 oPtr.push_back(address);
56 for (std::vector<unsigned long>::const_iterator itIndex = iIndicies.begin(), itEnd = iIndicies.end();
59 iter it = coll.begin();
60 std::advance(it, *itIndex);
67 "TypeConversionError " 68 "edm::PtrVector<> : unable to convert type ",
69 typeid(element_type).
name(),
79 template <
typename T,
typename A>
81 std::type_info
const& iToType,
82 std::vector<unsigned long>
const& iIndicies,
83 std::vector<void const*>& oPtr) {
87 template <
typename T,
typename A>
89 std::type_info
const& iToType,
90 std::vector<unsigned long>
const& iIndicies,
91 std::vector<void const*>& oPtr) {
95 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,
typename Comp>
105 std::type_info
const& iToType,
106 std::vector<unsigned long>
const& iIndicies,
107 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="")
COLLECTION::value_type element_type
void reallyfillPtrVector(COLLECTION const &coll, std::type_info const &iToType, std::vector< unsigned long > const &iIndicies, std::vector< void const *> &oPtr)
void const * pointerToBase(std::type_info const &baseTypeInfo, T const *address)