blob: 78331e4caafc537afad5c7e5498a093d3977b10d (
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 <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;
};
}
}
|