Alchemy
1.0
A framework to robustly process network messages and structured data
|
Policy class used to perform byte-order operations. More...
#include <byte_order.h>
Static Public Member Functions | |
static T | swap_order (const T &value) |
Swaps the byte-order of value T based on platform endianess. More... | |
Policy class used to perform byte-order operations.
The EndianType struct is a policy class that provides the swap function. The swap capability is indicated by t0he isSwap template parameter.
<typename | T> The type of variable to perform the swap upon. |
<bool | isSwap> Indicates if the swap should be performed for this EndianType.
|
Definition at line 199 of file byte_order.h.
|
inlinestatic |
Swaps the byte-order of value T based on platform endianess.
This swap function will instantiate the proper version of EndianSwap based on the current EndianType and input value type T. If T does not contain a EndianSwap specialization, no operation will be performed.
value | The value whose byte-order will be swapped. |
Definition at line 212 of file byte_order.h.