2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-05-29 08:20:53 +00:00
qpdf/libqpdf/qpdf/QPDF_Destroyed.hh
Jay Berkenbilt dba61da1bf Create a special "destroyed" type rather than using null
When a QPDF is destroyed, changing indirect objects to direct nulls
makes them effectively disappear silently when they sneak into other
places. Instead, we should treat this as an error. Adding a destroyed
object type makes this possible.
2022-09-08 10:36:39 -04:00

20 lines
432 B
C++

#ifndef QPDF_DESTROYED_HH
#define QPDF_DESTROYED_HH
#include <qpdf/QPDFValue.hh>
class QPDF_Destroyed: public QPDFValue
{
public:
virtual ~QPDF_Destroyed() = default;
virtual std::shared_ptr<QPDFValueProxy> shallowCopy();
virtual std::string unparse();
virtual JSON getJSON(int json_version);
static std::shared_ptr<QPDFValue> getInstance();
private:
QPDF_Destroyed();
};
#endif // QPDF_DESTROYED_HH