All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Namespaces | Classes | Typedefs | Functions
lar::details Namespace Reference

Namespace hiding implementation details. More...

Namespaces

 bulk_allocator
 Namespace specific to bulk allocator.
 
 counters_map
 
 type_traits
 

Classes

struct  ServiceRequirementsChecker
 
struct  ProviderPackExtractor
 
struct  ServiceProviderRequirementsChecker
 Compiles only if PROVIDER class satisfied service provider requirements. More...
 
struct  ProviderPackExtractor< First, Others...>
 
struct  ProviderPackExtractor< Service >
 
struct  has_duplicate_types
 
struct  SetFrom
 Implementation detail for the extraction constructor. More...
 
struct  has_type
 
struct  has_type< Target, First, Others...>
 
struct  has_type< Target, Target, Others...>
 
struct  has_type< Target >
 
struct  has_duplicate_types< Key, Types...>
 
struct  has_duplicate_types<>
 
struct  are_types_contained
 
struct  are_same_types
 
struct  are_types_contained< First, OtherTypes...>
 
struct  are_types_contained< First >
 
struct  is_provider_pack
 
struct  is_provider_pack< ProviderPack< Providers...> >
 
struct  have_same_provider_types
 
struct  have_same_provider_types< ProviderPack< AProviders...>, ProviderPack< BProviders...> >
 
struct  findFirstMatching_answer
 
struct  findFirstMatching_answer< Match, Target, true, Candidates...>
 
struct  findFirstMatching_dispatcher
 
struct  findFirstMatching_dispatcher< Match, Target >
 
struct  findFirstMatching_dispatcher< Match, Target, FirstCandidate, OtherCandidates...>
 
struct  findFirstMatching_answer< Match, Target, false, FirstCandidate, OtherCandidates...>
 
struct  findFirstMatching_impl
 
struct  findNextMatching_impl
 
struct  findNextMatching_impl< NSkip, Match, Target, FirstCandidate, OtherCandidates...>
 
struct  findNextMatching_impl< 0U, Match, Target, FirstCandidate, OtherCandidates...>
 
struct  findNextMatching_impl< NSkip, Match, Target >
 
struct  findTheMatching_impl
 
struct  is_derived_of
 
struct  SetFrom< DestPack, SourcePack, FirstProvider, OtherProviders...>
 
struct  SetFrom< DestPack, SourcePack >
 
struct  ProviderPackComparerBase
 
struct  ProviderPackComparer
 
struct  ProviderPackComparer< APack, BPack, First, Others...>
 
struct  ProviderPackComparer< APack, BPack, First >
 
struct  OptionalHexFloatFormatter
 
struct  RangeTraits
 
class  CollectionExtremes
 Class storing a begin and a end iterator. More...
 
class  CounterBlock
 Type of block of counters (just a STL array until SUBCOUNTERS are in) More...
 
struct  CountersMapTraits
 
struct  enable_if_type_exists
 
class  iteratorRange
 Enclosure to use two iterators representing a range in a range-for loop. More...
 
class  const_datarange_iterator
 

Typedefs

template<bool Value>
using bool_constant = std::integral_constant< bool, Value >
 
template<std::size_t Value>
using index_constant = std::integral_constant< std::size_t, Value >
 
template<typename T , typename R = void>
using enable_if_type_exists_t = typename enable_if_type_exists< T, R >::type
 
template<typename H , typename R = void>
using enable_if_is_handle_t = enable_if_type_exists_t< typename std::decay_t< H >::HandleTag, R >
 

Functions

template<typename Derived , typename... Bases>
constexpr std::size_t indexOfBaseOf ()
 Index of the class among Bases which is base of Derived. More...
 
template<typename Derived , typename... Bases>
constexpr std::size_t indexOfDerivedFrom ()
 
template<typename Derived , typename... Bases>
constexpr std::size_t findBaseOf ()
 Index of the class among Bases which is base of Derived. More...
 
template<typename Derived , typename... Bases>
constexpr std::size_t findDerivedFrom ()
 
template<typename Derived , typename... Bases>
constexpr std::size_t hasBaseOf ()
 Returns whether there is exactly one base class of Derived among Bases. More...
 
template<typename Derived , typename... Bases>
constexpr std::size_t hasDerivedFrom ()
 
template<typename Provider , typename APack , typename BPack >
bool haveSameProvider (APack const &a, BPack const &b)
 
template<typename T >
std::ostream & operator<< (std::ostream &os, details::OptionalHexFloatFormatter< T > fmt)
 
template<typename BeginIter , typename EndIter >
auto makeCollectionExtremes (BeginIter const &b, EndIter const &e)
 Helper to create a CollectionExtremes object from two iterators. More...
 
template<typename Range >
auto makeCollectionExtremes (Range const &range)
 Helper to create a CollectionExtremes object from a range object. More...
 
template<typename Range >
CollectionView< Range > makeCollectionView (Range &&)
 
constexpr int LowestSetBitScaler (unsigned long long int v, int b)
 Internally used by LowestSetBit. More...
 
template<typename T >
decltype(auto) make_const_datarange_t (typename sparse_vector< T >::datarange_t &r)
 
template<typename T >
std::string demangle ()
 Demangles the name of a type. More...
 
template<typename T >
std::string demangle (const T &)
 

Detailed Description

Namespace hiding implementation details.

Typedef Documentation

template<bool Value>
using lar::details::bool_constant = typedef std::integral_constant<bool, Value>

Definition at line 314 of file ProviderPack.h.

template<typename H , typename R = void>
using lar::details::enable_if_is_handle_t = typedef enable_if_type_exists_t<typename std::decay_t<H>::HandleTag, R>

Definition at line 38 of file FindManyInChainP.h.

template<typename T , typename R = void>
using lar::details::enable_if_type_exists_t = typedef typename enable_if_type_exists<T, R>::type

Definition at line 34 of file FindManyInChainP.h.

template<std::size_t Value>
using lar::details::index_constant = typedef std::integral_constant<std::size_t, Value>

Definition at line 317 of file ProviderPack.h.

Function Documentation

template<typename T >
std::string lar::details::demangle ( )

Demangles the name of a type.

Template Parameters
Ttype to be demangled
Parameters
[anonymous]parameter to determine the type
Returns
a string with the demangled name

This function relies on GCC ABI; if there is no GCC, no demangling happens. One version of this function takes no parameters, and the type must be specified explicitly in the call. The other takes one parameter, that is not actually used but allows the compiler to understand which type to use. The following usese are equivalent:

std::vector<int> v;
std::cout << demangle<std::vector<int>>() << std::endl;
std::cout << demangle(v) << std::endl;

Definition at line 205 of file BulkAllocator.h.

205  {
206  std::string name = typeid(T).name();
207  #ifdef __GNUG__
208  int status; // some arbitrary value to eliminate the compiler warning
209  std::unique_ptr<char, void(*)(void*)> res
210  { abi::__cxa_demangle(name.c_str(), NULL, NULL, &status), std::free };
211  return (status==0) ? res.get() : name ;
212  #else // !__GNUG__
213  return name;
214  #endif // ?__GNUG__
215  } // demangle()
then echo fcl name
template<typename T >
std::string lar::details::demangle ( const T &  )
inline

Definition at line 218 of file BulkAllocator.h.

218 { return demangle<T>(); }
template<typename Derived , typename... Bases>
constexpr std::size_t lar::details::findBaseOf ( )

Index of the class among Bases which is base of Derived.

Template Parameters
Derivedthe class to be found
Basesa list of classes candidate to be the base of Derived
Returns
index of the class among Bases which is base of Derived
Exceptions
static_assertif none, or multiple classes, are base of Derived
See Also
hasBaseOf(), indexOfBaseOf()

Definition at line 579 of file ProviderPack.h.

580  {
581  constexpr std::size_t index = indexOfBaseOf<Derived, Bases...>();
582  static_assert(
583  index < sizeof...(Bases),
584  "Target is not derived from any of the available classes"
585  );
586  return index;
587  } // findBaseOf()
constexpr std::size_t indexOfBaseOf()
Index of the class among Bases which is base of Derived.
Definition: ProviderPack.h:575
template<typename Derived , typename... Bases>
constexpr std::size_t lar::details::findDerivedFrom ( )

Definition at line 598 of file ProviderPack.h.

599  {
600  constexpr std::size_t index = indexOfDerivedFrom<Base, Derived...>();
601  static_assert(
602  index < sizeof...(Derived),
603  "Target is not base of any of the available classes"
604  );
605  return index;
606  } // findDerivedFrom()
constexpr std::size_t indexOfDerivedFrom()
Definition: ProviderPack.h:594
template<typename Derived , typename... Bases>
constexpr std::size_t lar::details::hasBaseOf ( )

Returns whether there is exactly one base class of Derived among Bases.

Template Parameters
Derivedthe class to be found
Basesa list of classes candidate to be the base of Derived
Returns
whether there is exactly one base class of Derived
Exceptions
static_assertif multiple classes are base of Derived
See Also
indexOfBaseOf(), findBaseOf()

Definition at line 73 of file ProviderPack.h.

74  { return indexOfBaseOf<Derived, Bases...>() < sizeof...(Bases); }
constexpr std::size_t indexOfBaseOf()
Index of the class among Bases which is base of Derived.
Definition: ProviderPack.h:575
template<typename Derived , typename... Bases>
constexpr std::size_t lar::details::hasDerivedFrom ( )

Definition at line 77 of file ProviderPack.h.

78  { return indexOfDerivedFrom<Derived, Bases...>() < sizeof...(Bases); }
constexpr std::size_t indexOfDerivedFrom()
Definition: ProviderPack.h:594
template<typename Provider , typename APack , typename BPack >
bool lar::details::haveSameProvider ( APack const &  a,
BPack const &  b 
)

Definition at line 635 of file ProviderPack.h.

635  {
636  static_assert(is_provider_pack<APack>() && is_provider_pack<BPack>(),
637  "This class needs two ProviderPack template types.");
638  return a.template get<Provider>() == b.template get<Provider>();
639  } // haveSameProvider()
process_name gaushit a
template<typename Derived , typename... Bases>
constexpr std::size_t lar::details::indexOfBaseOf ( )

Index of the class among Bases which is base of Derived.

Template Parameters
Derivedthe class to be found
Basesa list of classes candidate to be the base of Derived
Returns
index of the class among Bases which is base of Derived
Exceptions
static_assertif multiple classes are base of Derived
See Also
hasBaseOf(), findBaseOf()

If no class among Bases is actually a base class of Derived, an invalid index is returned, greater than any valid index (that is, no smaller than sizeof...(Bases)).

Definition at line 575 of file ProviderPack.h.

576  { return findTheMatching_impl<std::is_base_of, Derived, Bases...>(); }
template<typename Derived , typename... Bases>
constexpr std::size_t lar::details::indexOfDerivedFrom ( )

Definition at line 594 of file ProviderPack.h.

595  { return findTheMatching_impl<is_derived_of, Base, Derived...>(); }
constexpr int lar::details::LowestSetBitScaler ( unsigned long long int  v,
int  b 
)
inline

Internally used by LowestSetBit.

Definition at line 402 of file CountersMap.h.

403  { return (v & 1)? b: LowestSetBitScaler(v >> 1, b + 1); }
constexpr int LowestSetBitScaler(unsigned long long int v, int b)
Internally used by LowestSetBit.
Definition: CountersMap.h:402
template<typename T >
decltype(auto) lar::details::make_const_datarange_t ( typename sparse_vector< T >::datarange_t &  r)
template<typename BeginIter , typename EndIter >
auto lar::details::makeCollectionExtremes ( BeginIter const &  b,
EndIter const &  e 
)

Helper to create a CollectionExtremes object from two iterators.

Definition at line 149 of file CollectionView.h.

150  { return CollectionExtremes<BeginIter, EndIter>(b, e); }
do i e
template<typename Range >
auto lar::details::makeCollectionExtremes ( Range const &  range)

Helper to create a CollectionExtremes object from a range object.

Definition at line 155 of file CollectionView.h.

156  {
157  using std::cbegin;
158  using std::cend;
159  return makeCollectionExtremes(cbegin(range), cend(range));
160  } // makeCollectionExtremes(range)
auto makeCollectionExtremes(BeginIter const &b, EndIter const &e)
Helper to create a CollectionExtremes object from two iterators.
auto cbegin(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:567
auto cend(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:579
template<typename Range >
CollectionView< Range > lar::details::makeCollectionView ( Range &&  range)

Definition at line 446 of file CollectionView.h.

447  { return CollectionView<Range>(std::move(range)); }
template<typename T >
std::ostream& lar::details::operator<< ( std::ostream &  os,
details::OptionalHexFloatFormatter< T >  fmt 
)

Definition at line 81 of file hexfloat.h.

82  { return fmt(os); }