mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-23 03:18:59 +00:00
d0e99f195a
Give objects descriptions and context so it is possible to issue warnings instead of fatal errors for attempts to access objects of the wrong type.
37 lines
597 B
C++
37 lines
597 B
C++
#include <qpdf/QPDFObject.hh>
|
|
|
|
QPDFObject::Members::Members() :
|
|
owning_qpdf(0)
|
|
{
|
|
}
|
|
|
|
QPDFObject::Members::~Members()
|
|
{
|
|
}
|
|
|
|
QPDFObject::QPDFObject() :
|
|
m(new Members)
|
|
{
|
|
}
|
|
|
|
void
|
|
QPDFObject::setDescription(QPDF* qpdf, std::string const& description)
|
|
{
|
|
this->m->owning_qpdf = qpdf;
|
|
this->m->object_description = description;
|
|
}
|
|
|
|
bool
|
|
QPDFObject::getDescription(QPDF*& qpdf, std::string& description)
|
|
{
|
|
qpdf = this->m->owning_qpdf;
|
|
description = this->m->object_description;
|
|
return this->m->owning_qpdf;
|
|
}
|
|
|
|
bool
|
|
QPDFObject::hasDescription()
|
|
{
|
|
return this->m->owning_qpdf;
|
|
}
|