blob: 25b5c2765d7776814e89dbcb4bdf95b299bc1198 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <memory>
#include <vespa/vespalib/data/memory.h>
namespace vespalib::slime {
/**
* Interface used to access external memory. External memory does not
* need to be copied when added to a Slime object. The Memory obtained
* by calling the get function must be valid until the object
* implementing this interface is destructed.
**/
struct ExternalMemory {
using UP = std::unique_ptr<ExternalMemory>;
virtual Memory get() const = 0;
virtual ~ExternalMemory() = default;
};
} // namespace vespalib::slime
|