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

#include "spanlist.h"
#include "spantreevisitor.h"

namespace document {

SpanList::~SpanList() {
    for (size_t i = 0; i < _span_vector.size(); ++i) {
        delete _span_vector[i];
    }
}

void SpanList::accept(SpanTreeVisitor &visitor) const {
    visitor.visit(*this);
}

SimpleSpanList::SimpleSpanList(size_t sz) :
    _span_vector(sz)
{
}

SimpleSpanList::~SimpleSpanList()
{
}

void SimpleSpanList::accept(SpanTreeVisitor &visitor) const {
    visitor.visit(*this);
}

}  // namespace document