class PiecewiseCombiner

Defined at line 104 of file ../../third_party/abseil-cpp/src/absl/hash/internal/hash.h

PiecewiseCombiner

PiecewiseCombiner is an internal-only helper class for hashing a piecewise

buffer of `char` or `unsigned char` as though it were contiguous. This class

provides two methods:

H add_buffer(state, data, size)

H finalize(state)

`add_buffer` can be called zero or more times, followed by a single call to

`finalize`. This will produce the same hash expansion as concatenating each

buffer piece into a single contiguous buffer, and passing this to

`H::combine_contiguous`.

Example usage:

PiecewiseCombiner combiner;

for (const auto

&

piece : pieces) {

state = combiner.add_buffer(std::move(state), piece.data, piece.size);

}

return combiner.finalize(std::move(state));

Public Methods

void PiecewiseCombiner ()

Defined at line 106 of file ../../third_party/abseil-cpp/src/absl/hash/internal/hash.h

void PiecewiseCombiner (const PiecewiseCombiner & )

Defined at line 107 of file ../../third_party/abseil-cpp/src/absl/hash/internal/hash.h

PiecewiseCombiner & operator= (const PiecewiseCombiner & )

Defined at line 108 of file ../../third_party/abseil-cpp/src/absl/hash/internal/hash.h

template <typename H>
H add_buffer (H state, const char * data, size_t size)

Defined at line 117 of file ../../third_party/abseil-cpp/src/absl/hash/internal/hash.h

template <typename H>
H add_buffer (H state, const unsigned char * data, size_t size)

PiecewiseCombiner::add_buffer()

Appends the given range of bytes to the sequence to be hashed, which may

modify the provided hash state.

Defined at line 1333 of file ../../third_party/abseil-cpp/src/absl/hash/internal/hash.h

template <typename H>
H finalize (H state)

PiecewiseCombiner::finalize()

Finishes combining the hash sequence, which may may modify the provided

hash state.

Once finalize() is called, add_buffer() may no longer be called. The

resulting hash state will be the same as if the pieces passed to

add_buffer() were concatenated into a single flat buffer, and then provided

to H::combine_contiguous().

Defined at line 1366 of file ../../third_party/abseil-cpp/src/absl/hash/internal/hash.h