LDMX Software
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Typedefs
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
Related Symbols
Files
File List
File Members
All
Functions
Macros
Packing
include
Packing
Utility
Hex.h
1
#ifndef PACKING_UTILITY_HEX_H_
2
#define PACKING_UTILITY_HEX_H_
3
4
#include <iomanip>
5
6
namespace
packing {
7
namespace
utility {
8
17
template
<
typename
WordType>
18
struct
hex
{
19
static
const
std::size_t width_{8 *
sizeof
(WordType)};
20
WordType& word_;
21
hex
(WordType& w) : word_{w} {}
22
friend
inline
std::ostream& operator<<(
23
std::ostream& os,
const
packing::utility::hex<WordType>
& h) {
24
os <<
"0x"
<< std::setfill(
'0'
) << std::setw(h.width_) << std::hex
25
<< h.word_ << std::dec;
26
return
os;
27
}
28
};
18
struct
hex
{
…
};
29
30
}
// namespace utility
31
}
// namespace packing
32
33
#endif
// PACKING_UTILITY_HEX_H_
packing::utility::hex
A very simple wrapper enabling us to more easily tell the output stream to style the input word in he...
Definition
Hex.h:18
Generated by
1.12.0