Commit 9dd221254723d5d92d3a815cc2c5afa6c6d36b11

Authored by m-holger
1 parent 86e7cacf

Add method BaseHandle::null

include/qpdf/ObjectHandle.hh
... ... @@ -53,6 +53,7 @@ namespace qpdf
53 53  
54 54 // The rest of the header file is for qpdf internal use only.
55 55  
  56 + inline bool null() const;
56 57 inline qpdf_object_type_e type_code() const;
57 58  
58 59 protected:
... ...
libqpdf/qpdf/QPDFObjectHandle_private.hh
... ... @@ -325,6 +325,12 @@ namespace qpdf
325 325 return nullptr;
326 326 }
327 327  
  328 + inline bool
  329 + BaseHandle::null() const
  330 + {
  331 + return !obj || obj->getResolvedTypeCode() == ::ot_null;
  332 + }
  333 +
328 334 inline qpdf_object_type_e
329 335 BaseHandle::type_code() const
330 336 {
... ...