1 #ifndef canvas_Persistency_Common_getElementAddresses_h 2 #define canvas_Persistency_Common_getElementAddresses_h 12 template <
typename Collection>
14 std::type_info
const& iToType,
15 std::vector<unsigned long>
const&
indices,
16 std::vector<void const*>& oPtr);
20 std::type_info
const& iToType,
21 std::vector<unsigned long>
const&
indices,
22 std::vector<void const*>& oPtr);
25 class value_type_helper;
41 static size_t const pair_stem_offset_s =
pair_stem().size();
42 return pair_stem_offset_s;
56 cet::demangle_symbol(
typeid(
T).
name());
65 template <
typename Collection>
68 std::type_info
const& iToType,
69 std::vector<unsigned long>
const&
indices,
70 std::vector<void const*>& oPtr)
72 oPtr.reserve(indices.size());
73 for (
auto const index : indices) {
74 auto it = coll.cbegin();
84 std::type_info
const& iToType,
85 std::vector<unsigned long>
const&
indices,
86 std::vector<void const*>& oPtr)
92 oPtr.reserve(indices.size());
95 for (
auto const index : indices) {
97 auto ptr = (it == obj.
cend()) ?
nullptr : &*it;
102 for (
auto const index : indices) {
const_iterator cend() const noexcept
iterator find(key_type key)
bool starts_with_pair(std::string const &type_name, size_t const pos)
static std::string const & pair_stem()
std::string uniform_type_name(std::type_info const &tid)
static size_t pair_stem_offset()
constexpr std::array< std::size_t, geo::vect::dimension< Vector >)> indices()
Returns a sequence of indices valid for a vector of the specified type.
void getElementAddresses(Collection const &coll, std::type_info const &iToType, std::vector< unsigned long > const &indices, std::vector< void const * > &oPtr)
void const * maybeCastObj(void const *address, std::type_info const &tiFrom, std::type_info const &tiTo)
mapped_type * getOrNull(key_type key)