ATLAS Offline Software
Public Types | Static Public Member Functions | List of all members
SG::AuxDataTraits< bool, ALLOC > Class Template Reference

Allow customizing how aux data types are treated. More...

#include <AuxDataTraits.h>

Collaboration diagram for SG::AuxDataTraits< bool, ALLOC >:

Public Types

using element_type = bool
 The type the user sees. More...
 
using reference_type = element_type &
 Reference types returned by aux data accessors. More...
 
using const_reference_type = const element_type &
 
using allocator_type = typename std::allocator_traits< ALLOC >::template rebind_alloc< char >
 Allocator type used to store this variable. More...
 
using vector_type = std::vector< char, allocator_type >
 Container type used to store this variable. More...
 
using container_value_type = typename vector_type::value_type
 
using container_pointer_type = typename vector_type::pointer
 Pointers to the data within the container. More...
 
using const_container_pointer_type = typename vector_type::const_pointer
 
using span = CxxUtils::span< container_value_type >
 
using const_span = CxxUtils::span< const container_value_type >
 

Static Public Member Functions

static reference_type index (void *ptr, size_t ndx)
 Look up an element in the container by index. More...
 
static const_reference_type index (const void *ptr, size_t ndx)
 Look up an element in the container by index. More...
 

Detailed Description

template<class ALLOC>
class SG::AuxDataTraits< bool, ALLOC >

Allow customizing how aux data types are treated.

Special case for bool variables.

T here is the type that the user requests, eg in the template argument of a decorator.

Definition at line 88 of file AuxDataTraits.h.

Member Typedef Documentation

◆ allocator_type

template<class ALLOC >
using SG::AuxDataTraits< bool, ALLOC >::allocator_type = typename std::allocator_traits<ALLOC>::template rebind_alloc<char>

Allocator type used to store this variable.

Definition at line 99 of file AuxDataTraits.h.

◆ const_container_pointer_type

template<class ALLOC >
using SG::AuxDataTraits< bool, ALLOC >::const_container_pointer_type = typename vector_type::const_pointer

Definition at line 107 of file AuxDataTraits.h.

◆ const_reference_type

template<class ALLOC >
using SG::AuxDataTraits< bool, ALLOC >::const_reference_type = const element_type&

Definition at line 96 of file AuxDataTraits.h.

◆ const_span

template<class ALLOC >
using SG::AuxDataTraits< bool, ALLOC >::const_span = CxxUtils::span<const container_value_type>

Definition at line 124 of file AuxDataTraits.h.

◆ container_pointer_type

template<class ALLOC >
using SG::AuxDataTraits< bool, ALLOC >::container_pointer_type = typename vector_type::pointer

Pointers to the data within the container.

Definition at line 106 of file AuxDataTraits.h.

◆ container_value_type

template<class ALLOC >
using SG::AuxDataTraits< bool, ALLOC >::container_value_type = typename vector_type::value_type

Definition at line 103 of file AuxDataTraits.h.

◆ element_type

template<class ALLOC >
using SG::AuxDataTraits< bool, ALLOC >::element_type = bool

The type the user sees.

Definition at line 92 of file AuxDataTraits.h.

◆ reference_type

template<class ALLOC >
using SG::AuxDataTraits< bool, ALLOC >::reference_type = element_type&

Reference types returned by aux data accessors.

Definition at line 95 of file AuxDataTraits.h.

◆ span

template<class ALLOC >
using SG::AuxDataTraits< bool, ALLOC >::span = CxxUtils::span<container_value_type>

Definition at line 123 of file AuxDataTraits.h.

◆ vector_type

template<class ALLOC >
using SG::AuxDataTraits< bool, ALLOC >::vector_type = std::vector<char, allocator_type>

Container type used to store this variable.

Definition at line 102 of file AuxDataTraits.h.

Member Function Documentation

◆ index() [1/2]

template<class ALLOC >
static const_reference_type SG::AuxDataTraits< bool, ALLOC >::index ( const void *  ptr,
size_t  ndx 
)
inlinestatic

Look up an element in the container by index.

ptr is a pointer to the start of the container's data.

Definition at line 118 of file AuxDataTraits.h.

119  {
120  return reinterpret_cast<const bool*>(ptr)[ndx];
121  }

◆ index() [2/2]

template<class ALLOC >
static reference_type SG::AuxDataTraits< bool, ALLOC >::index ( void *  ptr,
size_t  ndx 
)
inlinestatic

Look up an element in the container by index.

ptr is a pointer to the start of the container's data.

Definition at line 111 of file AuxDataTraits.h.

112  {
113  return reinterpret_cast<bool*>(ptr)[ndx];
114  }

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