|
CppLogging 1.0.5.0
C++ Logging Library
|
Hash layout. More...
#include <hash_layout.h>
Public Member Functions | |
| HashLayout ()=default | |
| HashLayout (const HashLayout &)=delete | |
| HashLayout (HashLayout &&)=delete | |
| virtual | ~HashLayout ()=default |
| HashLayout & | operator= (const HashLayout &)=delete |
| HashLayout & | operator= (HashLayout &&)=delete |
| void | LayoutRecord (Record &record) override |
| Layout the given logging record into a raw buffer. | |
Public Member Functions inherited from CppLogging::Element | |
| virtual bool | IsStarted () const noexcept |
| Is the logging element started? | |
| virtual bool | Start () |
| Start the logging element. | |
| virtual bool | Stop () |
| Stop the logging element. | |
Static Public Member Functions | |
| static uint32_t | Hash (std::string_view message) |
| Hash the given string message using FNV-1a hashing algorithm. | |
Hash layout.
Hash layout performs simple memory copy operation to convert the given logging record into the plane raw buffer. Logging message is stored as a 32-bit hash of the message string.
Hash algorithm is 32-bit FNV-1a string hashing.
Thread-safe.
Definition at line 26 of file hash_layout.h.
|
default |
|
delete |
|
delete |
|
virtualdefault |
|
static |
Hash the given string message using FNV-1a hashing algorithm.
FNV-1a string hashing is the fast non-cryptographic hash function created by Glenn Fowler, Landon Curt Noll, and Kiem-Phong Vo.
https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
| message | - Message string |
Definition at line 16 of file hash_layout.cpp.
|
overridevirtual |
Layout the given logging record into a raw buffer.
This method will update the raw filed of the given logging record.
| record | - Logging record |
Implements CppLogging::Layout.
Definition at line 30 of file hash_layout.cpp.
|
delete |
|
delete |