/src/serenity/Userland/Libraries/LibPDF/Reference.h
Line | Count | Source |
1 | | /* |
2 | | * Copyright (c) 2021, Matthew Olsson <mattco@serenityos.org> |
3 | | * Copyright (c) 2021, Ben Wiederhake <BenWiederhake.GitHub@gmx.de> |
4 | | * |
5 | | * SPDX-License-Identifier: BSD-2-Clause |
6 | | */ |
7 | | |
8 | | #pragma once |
9 | | |
10 | | #include <AK/Types.h> |
11 | | |
12 | | namespace PDF { |
13 | | |
14 | | class Reference { |
15 | | public: |
16 | | Reference(u32 index, u32 generation_index) |
17 | 20 | : m_ref_index(index) |
18 | 20 | , m_generation_index(generation_index) |
19 | 20 | { |
20 | 20 | } |
21 | | |
22 | | [[nodiscard]] ALWAYS_INLINE u32 as_ref_index() const |
23 | 0 | { |
24 | 0 | return m_ref_index; |
25 | 0 | } |
26 | | |
27 | | [[nodiscard]] ALWAYS_INLINE u32 as_ref_generation_index() const |
28 | 0 | { |
29 | 0 | return m_generation_index; |
30 | 0 | } |
31 | | |
32 | | private: |
33 | | u32 m_ref_index; |
34 | | u32 m_generation_index; |
35 | | }; |
36 | | |
37 | | } |