LDMX Software
packing::utility::Hex< WordType > Struct Template Reference

Public Member Functions

 Hex (WordType &w)
 

Public Attributes

WordType & word_
 

Static Public Attributes

static const std::size_t WIDTH {8 * sizeof(WordType)}
 

Friends

std::ostream & operator<< (std::ostream &os, const packing::utility::Hex< WordType > &h)
 

Detailed Description

template<typename WordType>
struct packing::utility::Hex< WordType >

Definition at line 18 of file Hex.h.

Constructor & Destructor Documentation

◆ Hex()

template<typename WordType >
packing::utility::Hex< WordType >::Hex ( WordType & w)
inline

Definition at line 21 of file Hex.h.

21: word_{w} {}

Friends And Related Symbol Documentation

◆ operator<<

template<typename WordType >
std::ostream & operator<< ( std::ostream & os,
const packing::utility::Hex< WordType > & h )
friend

Definition at line 22 of file Hex.h.

23 {
24 os << "0x" << std::setfill('0') << std::setw(h.WIDTH) << std::hex << h.word_
25 << std::dec;
26 return os;
27 }

Member Data Documentation

◆ WIDTH

template<typename WordType >
const std::size_t packing::utility::Hex< WordType >::WIDTH {8 * sizeof(WordType)}
static

Definition at line 19 of file Hex.h.

19{8 * sizeof(WordType)};

◆ word_

template<typename WordType >
WordType& packing::utility::Hex< WordType >::word_

Definition at line 20 of file Hex.h.


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