ATLAS Offline Software
Public Types | Static Public Member Functions | Public Attributes | List of all members
CxxUtils::detail::UIntConv< T > Union Template Reference

Helpers for converting between uintptr_t and a pointer or integer. More...

#include <UIntConv.h>

Collaboration diagram for CxxUtils::detail::UIntConv< T >:

Public Types

using uint_t = typename SizedUInt< sizeof(T)>::type
 

Static Public Member Functions

static uintptr_t valToUInt (T x)
 Convert a T to a uintptr_t. More...
 
static T uintToVal (uintptr_t ui)
 Convert a uintptr_t to a T. More...
 

Public Attributes

uint_t ui
 
x
 

Detailed Description

template<class T>
union CxxUtils::detail::UIntConv< T >

Helpers for converting between uintptr_t and a pointer or integer.

Definition at line 36 of file UIntConv.h.

Member Typedef Documentation

◆ uint_t

template<class T >
using CxxUtils::detail::UIntConv< T >::uint_t = typename SizedUInt<sizeof(T)>::type

Definition at line 39 of file UIntConv.h.

Member Function Documentation

◆ uintToVal()

template<class T >
static T CxxUtils::detail::UIntConv< T >::uintToVal ( uintptr_t  ui)
inlinestatic

Convert a uintptr_t to a T.

Definition at line 59 of file UIntConv.h.

59  {
60  UIntConv u;
61  u.ui = static_cast<uint_t>(ui);
62  return u.x;
63  };

◆ valToUInt()

template<class T >
static uintptr_t CxxUtils::detail::UIntConv< T >::valToUInt ( x)
inlinestatic

Convert a T to a uintptr_t.

Definition at line 49 of file UIntConv.h.

49  {
50  UIntConv u;
51  u.x = x;
52  return static_cast<uintptr_t> (u.ui);
53  };

Member Data Documentation

◆ ui

template<class T >
uint_t CxxUtils::detail::UIntConv< T >::ui

Definition at line 42 of file UIntConv.h.

◆ x

template<class T >
T CxxUtils::detail::UIntConv< T >::x

Definition at line 43 of file UIntConv.h.


The documentation for this union was generated from the following file:
CxxUtils::detail::UIntConv::x
T x
Definition: UIntConv.h:43
CxxUtils::detail::UIntConv::uint_t
typename SizedUInt< sizeof(T)>::type uint_t
Definition: UIntConv.h:39
CxxUtils::detail::UIntConv::ui
uint_t ui
Definition: UIntConv.h:42
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:83