aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/expression/singleresultnode.h
blob: e11c866c2f521dc62d388ae80bea933d2255bdd6 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include "resultnode.h"

namespace search::expression {

class SingleResultNode : public ResultNode
{
public:
    virtual ~SingleResultNode() { }
    DECLARE_ABSTRACT_RESULTNODE(SingleResultNode);
    using CP = vespalib::IdentifiablePtr<SingleResultNode>;
    using UP = std::unique_ptr<SingleResultNode>;
    virtual SingleResultNode *clone() const override = 0;

    virtual void min(const ResultNode & b) = 0;
    virtual void max(const ResultNode & b) = 0;
    virtual void add(const ResultNode & b) = 0;

    virtual void setMin() = 0;
    virtual void setMax() = 0;
    virtual size_t onGetRawByteSize() const = 0;
    size_t getRawByteSize() const override { return onGetRawByteSize(); }
};

}