aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorm-holger <m-holger@kubitscheck.org>2022-08-14 11:50:30 +0200
committerm-holger <m-holger@kubitscheck.org>2022-09-01 18:19:06 +0200
commit4a8515912c80e8d98c3c1a42eec4bdf7b6bbd8e1 (patch)
treedeee2bcdb10bbf6818eb62ec6be8342da506f523 /include
parent56e9bcabe984acd4479ff7fef9a2a0ca669abc76 (diff)
downloadqpdf-4a8515912c80e8d98c3c1a42eec4bdf7b6bbd8e1.tar.zst
Add method QPDFObject::resolve
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDF.hh2
-rw-r--r--include/qpdf/QPDFObject.hh11
2 files changed, 11 insertions, 2 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh
index 42097425..bcd85cd2 100644
--- a/include/qpdf/QPDF.hh
+++ b/include/qpdf/QPDF.hh
@@ -843,7 +843,7 @@ class QPDF
// it can resolve indirect references.
class Resolver
{
- friend class QPDFObjectHandle;
+ friend class QPDFObject;
private:
static void
diff --git a/include/qpdf/QPDFObject.hh b/include/qpdf/QPDFObject.hh
index 7bb7c6e1..751a5736 100644
--- a/include/qpdf/QPDFObject.hh
+++ b/include/qpdf/QPDFObject.hh
@@ -153,10 +153,19 @@ class QPDFObject
}
bool
- isUnresolved()
+ isUnresolved() const
{
return value->type_code == ::ot_unresolved;
}
+ void
+ resolve()
+ {
+ if (isUnresolved()) {
+ doResolve();
+ }
+ }
+ void doResolve();
+
template <typename T>
T*
as()