2008-04-29 12:55:25 +00:00
|
|
|
#include <qpdf/QPDFObject.hh>
|
2018-02-16 22:25:27 +00:00
|
|
|
|
2020-04-02 22:52:31 +00:00
|
|
|
QPDFObject::QPDFObject() :
|
2022-07-26 11:37:50 +00:00
|
|
|
owning_qpdf(nullptr),
|
2019-10-02 11:30:53 +00:00
|
|
|
parsed_offset(-1)
|
2018-02-16 22:25:27 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-06-16 16:45:04 +00:00
|
|
|
std::shared_ptr<QPDFObject>
|
|
|
|
QPDFObject::do_create(QPDFObject* object)
|
|
|
|
{
|
|
|
|
std::shared_ptr<QPDFObject> obj(object);
|
|
|
|
return obj;
|
|
|
|
}
|
|
|
|
|
2018-02-16 22:25:27 +00:00
|
|
|
void
|
|
|
|
QPDFObject::setDescription(QPDF* qpdf, std::string const& description)
|
|
|
|
{
|
2020-04-02 22:52:31 +00:00
|
|
|
this->owning_qpdf = qpdf;
|
|
|
|
this->object_description = description;
|
2018-02-16 22:25:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
QPDFObject::getDescription(QPDF*& qpdf, std::string& description)
|
|
|
|
{
|
2020-04-02 22:52:31 +00:00
|
|
|
qpdf = this->owning_qpdf;
|
|
|
|
description = this->object_description;
|
2022-07-26 11:37:50 +00:00
|
|
|
return this->owning_qpdf != nullptr;
|
2018-02-16 22:25:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
QPDFObject::hasDescription()
|
|
|
|
{
|
2022-07-26 11:37:50 +00:00
|
|
|
return this->owning_qpdf != nullptr;
|
2018-02-16 22:25:27 +00:00
|
|
|
}
|
2019-10-02 11:30:53 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
QPDFObject::setParsedOffset(qpdf_offset_t offset)
|
|
|
|
{
|
2020-04-02 22:52:31 +00:00
|
|
|
this->parsed_offset = offset;
|
2019-10-02 11:30:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
qpdf_offset_t
|
|
|
|
QPDFObject::getParsedOffset()
|
|
|
|
{
|
2020-04-02 22:52:31 +00:00
|
|
|
return this->parsed_offset;
|
2019-10-02 11:30:53 +00:00
|
|
|
}
|