33#include <NDEVR/Buffer.h>
41 template<
class t_hash_type>
49 template <
class t_type,
class t_allocator,
class t_memory_manager>
52 if (buffer.
size() == 0)
61 template <
class t_type,
class t_allocator,
class t_memory_manager>
65 for (
uint04 ii = 0; ii < size; ii++)
70 template<
class t_type>
73 if (
sizeof(t_type) ==
sizeof(t_hash_type))
77 else if ((
sizeof(t_type) >
sizeof(t_hash_type)))
79 static const uint04 remainder =
sizeof(t_type) %
sizeof(t_hash_type);
80 static const uint04 num_to_copy =
sizeof(t_type) /
sizeof(t_hash_type);
81 for (
uint04 ii = 0; ii < num_to_copy; ii++)
83 memcpy(&
type_buffer, ((
uint01*)(&
object)) +
sizeof(t_hash_type) * ii,
sizeof(t_hash_type));
88 memcpy(&
type_buffer, ((
uint01*)(&
object)) +
sizeof(t_hash_type) * num_to_copy,
sizeof(remainder));
99 void update(
const t_hash_type& hash_value)
99 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:56
constexpr t_index_type size() const
Definition Buffer.hpp:823
Logic for generating checksums based on initial value and a type.
Definition CheckSumGenerator.h:43
void update(const Buffer< t_type, t_allocator, t_memory_manager > &buffer)
Definition CheckSumGenerator.h:50
t_hash_type m_checksum
Definition CheckSumGenerator.h:105
void update(const t_type &object)
Definition CheckSumGenerator.h:71
t_hash_type type_buffer
Definition CheckSumGenerator.h:104
void update(const Buffer< t_type, t_allocator, t_memory_manager > &buffer, uint04 max_size)
Definition CheckSumGenerator.h:62
CheckSumGenerator()
Definition CheckSumGenerator.h:45
void update(const t_hash_type &hash_value)
Definition CheckSumGenerator.h:99
t_hash_type getCheckSum()
Definition CheckSumGenerator.h:103
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:80
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
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