aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_Null.cc
blob: fdabdfa7efa6d0e26143f8b430ff17638c7161ba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#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";
}

JSON
QPDF_Null::getJSON(int json_version)
{
    // If this is updated, QPDF_Array::getJSON must also be updated.
    return JSON::makeNull();
}