2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-15 17:17:08 +00:00
qpdf/libqpdf/QPDF_Null.cc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.0 KiB
C++
Raw Normal View History

#include <qpdf/QPDF_Null.hh>
#include <qpdf/QPDFObject_private.hh>
QPDF_Null::QPDF_Null() :
QPDFValue(::ot_null, "null")
{
}
std::shared_ptr<QPDFObject>
QPDF_Null::create()
{
return do_create(new QPDF_Null());
}
std::shared_ptr<QPDFObject>
QPDF_Null::create(
std::shared_ptr<QPDFObject> parent, std::string_view const& static_descr, std::string var_descr)
{
auto n = do_create(new QPDF_Null());
n->setChildDescription(parent, static_descr, var_descr);
return n;
}
std::shared_ptr<QPDFObject>
QPDF_Null::create(
std::shared_ptr<QPDFValue> parent, std::string_view const& static_descr, std::string var_descr)
{
auto n = do_create(new QPDF_Null());
n->setChildDescription(parent, static_descr, var_descr);
return n;
}
std::shared_ptr<QPDFObject>
QPDF_Null::copy(bool shallow)
{
return create();
}
std::string
QPDF_Null::unparse()
{
return "null";
}
2018-12-17 22:40:29 +00:00
JSON
QPDF_Null::getJSON(int json_version)
2018-12-17 22:40:29 +00:00
{
2022-12-25 09:52:43 +00:00
// If this is updated, QPDF_Array::getJSON must also be updated.
2018-12-17 22:40:29 +00:00
return JSON::makeNull();
}