33#include <NDEVR/Buffer.h>
40 template<
class t_hash_type>
48 template <
class t_type,
class t_allocator,
class t_memory_manager>
51 if (buffer.
size() == 0)
60 template <
class t_type,
class t_allocator,
class t_memory_manager>
64 for (
uint04 ii = 0; ii < size; ii++)
69 template<
class t_type>
72 if (
sizeof(t_type) ==
sizeof(t_hash_type))
76 else if ((
sizeof(t_type) >
sizeof(t_hash_type)))
78 static const uint04 remainder =
sizeof(t_type) %
sizeof(t_hash_type);
79 static const uint04 num_to_copy =
sizeof(t_type) /
sizeof(t_hash_type);
80 for (
uint04 ii = 0; ii < num_to_copy; ii++)
82 memcpy(&
type_buffer, ((
uint01*)(&
object)) +
sizeof(t_hash_type) * ii,
sizeof(t_hash_type));
87 memcpy(&
type_buffer, ((
uint01*)(&
object)) +
sizeof(t_hash_type) * num_to_copy,
sizeof(remainder));
98 void update(
const t_hash_type& hash_value)
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:59
constexpr t_index_type size() const
Definition Buffer.hpp:1374
Logic for generating checksums based on initial value and a type.
Definition CheckSumGenerator.h:42
void update(const Buffer< t_type, t_allocator, t_memory_manager > &buffer)
Definition CheckSumGenerator.h:49
t_hash_type m_checksum
Definition CheckSumGenerator.h:104
void update(const t_type &object)
Definition CheckSumGenerator.h:70
t_hash_type type_buffer
Definition CheckSumGenerator.h:103
void update(const Buffer< t_type, t_allocator, t_memory_manager > &buffer, uint04 max_size)
Definition CheckSumGenerator.h:61
CheckSumGenerator()
Definition CheckSumGenerator.h:44
void update(const t_hash_type &hash_value)
Definition CheckSumGenerator.h:98
t_hash_type getCheckSum()
Definition CheckSumGenerator.h:102
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:78
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:94
constexpr t_type getMin(const t_type &left, const t_type &right)
Finds the minimum of the given arguments based on the < operator Author: Tyler Parke Date: 2017-11-05...
Definition BaseFunctions.hpp:56