2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-16 01:27:07 +00:00
qpdf/libqpdf/QPDF_Unresolved.cc
m-holger 7248cab71b Add class QPDF_Unresolved
Allow QPDFObjectHandle::obj to be set prior resolving object.

ot_unresolved has been appended to the list object types in order to
preserve the output of existing test cases.
2022-08-31 22:46:09 +01:00

42 lines
666 B
C++

#include <qpdf/QPDF_Unresolved.hh>
#include <stdexcept>
std::shared_ptr<QPDFObject>
QPDF_Unresolved::create()
{
return do_create(new QPDF_Unresolved());
}
std::shared_ptr<QPDFObject>
QPDF_Unresolved::shallowCopy()
{
return create();
}
std::string
QPDF_Unresolved::unparse()
{
throw std::logic_error(
"attempted to unparse an unresolveded QPDFObjectHandle");
return "";
}
JSON
QPDF_Unresolved::getJSON(int json_version)
{
return JSON::makeNull();
}
QPDFObject::object_type_e
QPDF_Unresolved::getTypeCode() const
{
return QPDFObject::ot_unresolved;
}
char const*
QPDF_Unresolved::getTypeName() const
{
return "unresolved";
}