CppTrader  1.0.4.0
C++ Trader
fast_hash.h
Go to the documentation of this file.
1 
9 #ifndef CPPTRADER_MATCHING_FAST_HASH_H
10 #define CPPTRADER_MATCHING_FAST_HASH_H
11 
12 #include <cstddef>
13 #include <cstdint>
14 
15 namespace CppTrader {
16 namespace Matching {
17 
19 
24 class FastHash
25 {
26 public:
27  FastHash() = default;
28  FastHash(const FastHash&) = default;
29  FastHash(FastHash&&) noexcept = default;
30  ~FastHash() = default;
31 
32  FastHash& operator=(const FastHash&) = default;
33  FastHash& operator=(FastHash&&) noexcept = default;
34 
36  size_t operator()(uint64_t value) const noexcept;
37 
39 
43  static uint64_t Parse(const char str[8]) noexcept;
44 };
45 
46 } // namespace Matching
47 } // namespace CppTrader
48 
49 #include "fast_hash.inl"
50 
51 #endif // CPPTRADER_MATCHING_FAST_HASH_H
Fast hash helper.
Definition: fast_hash.h:25
FastHash(const FastHash &)=default
static uint64_t Parse(const char str[8]) noexcept
Parse fixed size string value and return its 64-bit integer equivalent.
Definition: fast_hash.inl:22
FastHash(FastHash &&) noexcept=default
C++ Trader project definitions.
Definition: errors.h:16