File Any.hpp

Defines

_ACTS_ANY_DEBUG(x)
_ACTS_ANY_TRACK_ALLOCATION(T, heap)
_ACTS_ANY_TRACK_DEALLOCATION(T, heap)
_ACTS_ANY_VERBOSE(x)
_ACTS_ANY_VERBOSE_BUFFER(s, b)
namespace Acts

Note

This file is foreseen for the Geometry module to replace Extent

Typedefs

using Any = AnyBase<sizeof(void*)>
template<size_t SIZE>
class AnyBase : public Acts::AnyBaseAll
#include <Acts/Utilities/Any.hpp>

Small opaque cache type which uses small buffer optimization.

Public Functions

template<typename T, typename ...Args>
inline explicit AnyBase(std::in_place_type_t<T>, Args&&... args)
AnyBase() = default
template<typename T, typename = std::enable_if_t<!std::is_same_v<std::decay_t<T>, AnyBase<SIZE>>>>
inline explicit AnyBase(T &&value)
inline AnyBase(const AnyBase &other)
inline AnyBase(AnyBase &&other)
inline ~AnyBase()
template<typename T>
inline T &as()
template<typename T>
inline const T &as() const
inline operator bool() const
inline AnyBase &operator=(const AnyBase &other)
inline AnyBase &operator=(AnyBase &&other)

Private Functions

inline void copy(const AnyBase &fromAny)
inline void copyConstruct(const AnyBase &fromAny)
inline void *dataPtr()
inline const void *dataPtr() const
inline void destroy()
inline void move(AnyBase &&fromAny)
inline void moveConstruct(AnyBase &&fromAny)
inline void setDataPtr(void *ptr)

Private Members

std::array<std::byte, SIZE> m_data = {}
const Handler *m_handler = {nullptr}

Private Static Functions

template<typename T>
static inline void *copyConstructImpl(const void *from, void *to)
template<typename T>
static inline void copyImpl(const void *from, void *to)
template<typename T>
static inline void destroyImpl(void *ptr)
template<typename T>
static inline constexpr bool heapAllocated()
template<typename T>
static inline const Handler *makeHandler()
template<typename T>
static inline void moveConstructImpl(void *from, void *to)
template<typename T>
static inline void moveImpl(void *from, void *to)

Private Static Attributes

static constexpr size_t kMaxAlignment = std::max(alignof(std::max_align_t), size_t(0))
struct Handler

Public Members

void (*copy)(const void *from, void *to) = nullptr
void *(*copyConstruct)(const void *from, void *to) = nullptr
void (*destroy)(void *ptr) = nullptr
bool heapAllocated = {false}
void (*move)(void *from, void *to) = nullptr
void (*moveConstruct)(void *from, void *to) = nullptr
class AnyBaseAll
#include <Acts/Utilities/Any.hpp>

Subclassed by Acts::AnyBase< SIZE >, Acts::AnyBase< 16 >