aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDF_Bool.cc
blob: e7cf71056b193e2e0cebc92a6ac278eb43b27ae4 (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
#include <qpdf/QPDF_Bool.hh>

QPDF_Bool::QPDF_Bool(bool val) :
    val(val)
{
}

std::string
QPDF_Bool::unparse()
{
    return (val ? "true" : "false");
}

JSON
QPDF_Bool::getJSON()
{
    return JSON::makeBool(this->val);
}

QPDFObject::object_type_e
QPDF_Bool::getTypeCode() const
{
    return QPDFObject::ot_boolean;
}

char const*
QPDF_Bool::getTypeName() const
{
    return "boolean";
}

bool
QPDF_Bool::getVal() const
{
    return this->val;
}