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

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

QPDF_Bool::~QPDF_Bool()
{
}

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

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;
}