LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::detail::value_type_helper Class Reference

#include "getElementAddresses.h"

Public Member Functions

bool starts_with_pair (std::string const &type_name, size_t const pos)
 
template<typename T >
size_t look_past_pair ()
 

Static Public Member Functions

static std::string const & pair_stem ()
 
static size_t pair_stem_offset ()
 

Detailed Description

Definition at line 30 of file getElementAddresses.h.

Member Function Documentation

template<typename T >
size_t art::detail::value_type_helper::look_past_pair ( )
inline

Definition at line 54 of file getElementAddresses.h.

References pair_stem_offset(), and starts_with_pair().

Referenced by art::getElementAddresses(), and art::setPtr().

55  {
56  static std::string const mapped_type =
57  cet::demangle_symbol(typeid(T).name());
58  size_t pos = 0;
59  while (starts_with_pair(mapped_type, pos)) {
60  pos += pair_stem_offset();
61  }
62  return pos;
63  }
bool starts_with_pair(std::string const &type_name, size_t const pos)
static std::string const& art::detail::value_type_helper::pair_stem ( )
inlinestatic

Definition at line 33 of file getElementAddresses.h.

Referenced by pair_stem_offset(), and starts_with_pair().

34  {
35  static std::string const pair_stem_s("std::pair<");
36  return pair_stem_s;
37  }
static size_t art::detail::value_type_helper::pair_stem_offset ( )
inlinestatic

Definition at line 40 of file getElementAddresses.h.

References pair_stem().

Referenced by look_past_pair(), and starts_with_pair().

41  {
42  static size_t const pair_stem_offset_s = pair_stem().size();
43  return pair_stem_offset_s;
44  }
static std::string const & pair_stem()
bool art::detail::value_type_helper::starts_with_pair ( std::string const &  type_name,
size_t const  pos 
)
inline

Definition at line 47 of file getElementAddresses.h.

References pair_stem(), and pair_stem_offset().

Referenced by art::getElementAddresses(), look_past_pair(), and art::setPtr().

48  {
49  return type_name.compare(pos, pair_stem_offset(), pair_stem()) == 0;
50  }
static std::string const & pair_stem()

The documentation for this class was generated from the following file: