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

#include "multiargfunctionnode.h"

namespace search::expression {

class UnaryFunctionNode : public MultiArgFunctionNode
{
public:
    DECLARE_ABSTRACT_EXPRESSIONNODE(UnaryFunctionNode);
    UnaryFunctionNode() noexcept = default;
    UnaryFunctionNode(ExpressionNode::UP arg) :
        MultiArgFunctionNode()
    {
        appendArg(std::move(arg));
    }
protected:
    const ExpressionNode & getArg() const { return MultiArgFunctionNode::getArg(0); }
private:
    void onPrepareResult() override;
};

}