2008-04-29 12:55:25 +00:00
|
|
|
#include <qpdf/QPDF_Integer.hh>
|
|
|
|
|
2024-02-09 13:09:08 +00:00
|
|
|
#include <qpdf/JSON_writer.hh>
|
2008-04-29 12:55:25 +00:00
|
|
|
#include <qpdf/QUtil.hh>
|
|
|
|
|
2012-06-23 19:08:21 +00:00
|
|
|
QPDF_Integer::QPDF_Integer(long long val) :
|
2024-08-12 16:52:42 +00:00
|
|
|
QPDFValue(::ot_integer),
|
2008-04-29 12:55:25 +00:00
|
|
|
val(val)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-09-08 15:29:23 +00:00
|
|
|
std::shared_ptr<QPDFObject>
|
2022-06-16 16:45:04 +00:00
|
|
|
QPDF_Integer::create(long long value)
|
|
|
|
{
|
|
|
|
return do_create(new QPDF_Integer(value));
|
|
|
|
}
|
|
|
|
|
2022-09-08 15:29:23 +00:00
|
|
|
std::shared_ptr<QPDFObject>
|
2022-11-14 17:54:12 +00:00
|
|
|
QPDF_Integer::copy(bool shallow)
|
2022-06-16 16:45:04 +00:00
|
|
|
{
|
|
|
|
return create(val);
|
|
|
|
}
|
|
|
|
|
2008-04-29 12:55:25 +00:00
|
|
|
std::string
|
|
|
|
QPDF_Integer::unparse()
|
|
|
|
{
|
2022-09-21 16:49:21 +00:00
|
|
|
return std::to_string(this->val);
|
2008-04-29 12:55:25 +00:00
|
|
|
}
|
|
|
|
|
2024-02-09 13:09:08 +00:00
|
|
|
void
|
|
|
|
QPDF_Integer::writeJSON(int json_version, JSON::Writer& p)
|
|
|
|
{
|
|
|
|
p << std::to_string(this->val);
|
|
|
|
}
|
|
|
|
|
2012-06-23 19:08:21 +00:00
|
|
|
long long
|
2008-04-29 12:55:25 +00:00
|
|
|
QPDF_Integer::getVal() const
|
|
|
|
{
|
|
|
|
return this->val;
|
|
|
|
}
|