diff options
author | Jay Berkenbilt <ejb@ql.org> | 2013-01-22 15:57:07 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2013-01-22 16:01:45 +0100 |
commit | 913eb5ac35011b3d28c653b6f89d936c8f99c844 (patch) | |
tree | ded1a2e1b5f9fcdf6a5e77e44e30aa528be306be /include/qpdf/QPDFObjectHandle.hh | |
parent | f81152311e5737e5e0de9dd9462311f306c6921b (diff) | |
download | qpdf-913eb5ac35011b3d28c653b6f89d936c8f99c844.tar.zst |
Add getTypeCode() and getTypeName()
Add virtual methods to QPDFObject, wrappers to QPDFObjectHandle, and
implementations to all the QPDF_Object types.
Diffstat (limited to 'include/qpdf/QPDFObjectHandle.hh')
-rw-r--r-- | include/qpdf/QPDFObjectHandle.hh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index c4a922d1..a23d81df 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -91,6 +91,14 @@ class QPDFObjectHandle QPDF_DLL bool isInitialized() const; + // Return type code and type name of underlying object. These are + // useful for doing rapid type tests (like switch statements) or + // for testing and debugging. + QPDF_DLL + QPDFObject::object_type_e getTypeCode() const; + QPDF_DLL + char const* getTypeName() const; + // Exactly one of these will return true for any object. Keyword // and InlineImage are only allowed in content streams. QPDF_DLL |