aboutsummaryrefslogtreecommitdiffstats
path: root/document/src/vespa/document/annotation/spannode.h
blob: b80ace9ec87a8621b55805fbac97757d20b955f3 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/vespalib/stllike/string.h>
#include <memory>

namespace document {
struct SpanTreeVisitor;

struct SpanNode {
    using UP = std::unique_ptr<SpanNode>;

    virtual ~SpanNode() = default;

    vespalib::string toString() const;
    virtual void accept(SpanTreeVisitor &visitor) const = 0;
};

std::ostream & operator << (std::ostream & os, const SpanNode & node);

}  // namespace document