Rev 1987 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1987 | Rev 1989 | ||
|---|---|---|---|
| Line 40... | Line 40... | ||
| 40 | typedef std::map<std::string, std::string> StringMap; |
40 | typedef std::map<std::string, std::string> StringMap; |
| 41 | 41 | ||
| 42 | #define SWAP_BYTE_ORDER_16(x) ((((x) << 8) | ((x) >> 8)) & 0xFFFF) |
42 | #define SWAP_BYTE_ORDER_16(x) ((((x) << 8) | ((x) >> 8)) & 0xFFFF) |
| 43 | #define GET_HIGH_BYTE_16(x) (((x) >> 8) & 0xFF); |
43 | #define GET_HIGH_BYTE_16(x) (((x) >> 8) & 0xFF); |
| 44 | #define GET_LOW_BYTE_16(x) ((x) & 0xFF) |
44 | #define GET_LOW_BYTE_16(x) ((x) & 0xFF) |
| - | 45 | ||
| - | 46 | #define ELEMENTS_OF(type) (sizeof(type) / sizeof(type[0])) |
|
| 45 | 47 | ||
| 46 | template <typename ElemT> |
48 | template <typename ElemT> |
| 47 | struct HexTo { |
49 | struct HexTo { |
| 48 | ElemT value; |
50 | ElemT value; |
| 49 | operator ElemT() const {return value;} |
51 | operator ElemT() const {return value;} |