| | |
| | | inline void PutInt(void *p, uint32_t u) { Put32(p, u); } |
| | | inline void PutInt(void *p, uint64_t u) { Put64(p, u); } |
| | | |
| | | constexpr uint64_t MaskBits(int nbits) { return (uint64_t(1) << nbits) - 1; } |
| | | |
| | | class ExitCall |
| | | { |
| | | typedef std::function<void(void)> func_t; |
| | |
| | | } |
| | | |
| | | protected: |
| | | static inline T &GetData() |
| | | static inline T &GetData(const std::string &msg = "Must set data before use!") |
| | | { |
| | | if (!ptr()) { throw std::string("Must set ShmMsg shm before use!"); } |
| | | if (!ptr()) { throw std::logic_error(msg); } |
| | | return *ptr(); |
| | | } |
| | | |