aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/attribute/attribute_vector_explorer.h
blob: 7c1442001069559e11aaf176f7869afc0d38cdfb (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
26
27
28
29
30
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/vespalib/net/http/state_explorer.h>

namespace search { class AttributeVector; }

namespace proton {

class AttributeExecutor;

/**
 * Class used to explore the state of an attribute vector.
 */
class AttributeVectorExplorer : public vespalib::StateExplorer
{
private:
    std::unique_ptr<const AttributeExecutor> _executor;

    void get_state_helper(const search::AttributeVector& attr, const vespalib::slime::Inserter &inserter, bool full) const;
public:
    AttributeVectorExplorer(std::unique_ptr<AttributeExecutor> executor);

    // Implements vespalib::StateExplorer
    void get_state(const vespalib::slime::Inserter &inserter, bool full) const override;
};

} // namespace proton