/* * Copyright (c) 2021, Matthew Olsson * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once namespace PDF { class Document; class Object; // Note: This macro doesn't care about PlainTextStreamObject and EncodedStreamObject because // we never need to work directly with either of them. #define ENUMERATE_OBJECT_TYPES(V) \ V(StringObject, string) \ V(NameObject, name) \ V(ArrayObject, array) \ V(DictObject, dict) \ V(StreamObject, stream) \ V(IndirectValue, indirect_value) #define FORWARD_DECL(class_name, _) class class_name; ENUMERATE_OBJECT_TYPES(FORWARD_DECL) #undef FORWARD_DECL template concept IsObject = IsBaseOf; template concept IsValuePrimitive = IsSame || IsSame || IsSame; template concept IsValueType = IsValuePrimitive || IsObject; template using UnwrappedValueType = Conditional, NonnullRefPtr, T>; }