aboutsummaryrefslogtreecommitdiffstats
path: root/staging_vespalib/src/vespa/vespalib/util/polymorphicarraybase.h
blob: 155d57909bea4225719f6a76bcc2c60b00528028 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
//
#pragma once

namespace vespalib {

class IArrayBase {
public:
    virtual ~IArrayBase() {}
    virtual void resize(size_t sz) = 0;
    virtual void reserve(size_t sz) = 0;
    virtual void clear() = 0;
    virtual IArrayBase *clone() const = 0;
    virtual size_t size() const = 0;
    bool empty() const { return size() == 0; }
};

}