blob: 1c7e85c2bb1f7894727a4273a93b7beac099ecb2 (
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 Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <stdint.h>
namespace search {
namespace grouping {
class GroupRef
{
public:
GroupRef() noexcept : _ref(-1) { }
GroupRef(uint32_t ref) : _ref(ref) { }
uint32_t getRef() const { return _ref; }
bool valid() const { return _ref != static_cast<uint32_t>(-1); }
operator uint32_t () const { return getRef(); }
private:
uint32_t _ref;
};
}
}
|