aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/test/vector_buffer_writer.h
blob: 8929825e890879eed3540ac09d61ab3bb9ef5dd6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/searchlib/util/bufferwriter.h>
#include <vector>

namespace search::test
{

/*
 * Class used by hnsw graph/index unit tests to save hnsw index to a
 * vector.
 */
class VectorBufferWriter : public BufferWriter {
private:
    char tmp[1024];
public:
    std::vector<char> output;
    VectorBufferWriter();
    ~VectorBufferWriter() override;
    void flush() override;
};

}