2008-04-29 12:55:25 +00:00
|
|
|
#include <qpdf/QPDF_Bool.hh>
|
|
|
|
|
|
|
|
QPDF_Bool::QPDF_Bool(bool val) :
|
|
|
|
val(val)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string
|
|
|
|
QPDF_Bool::unparse()
|
|
|
|
{
|
|
|
|
return (val ? "true" : "false");
|
|
|
|
}
|
|
|
|
|
2018-12-17 22:40:29 +00:00
|
|
|
JSON
|
2022-05-07 11:53:45 +00:00
|
|
|
QPDF_Bool::getJSON(int json_version)
|
2018-12-17 22:40:29 +00:00
|
|
|
{
|
|
|
|
return JSON::makeBool(this->val);
|
|
|
|
}
|
|
|
|
|
2013-01-22 14:57:07 +00:00
|
|
|
QPDFObject::object_type_e
|
|
|
|
QPDF_Bool::getTypeCode() const
|
|
|
|
{
|
|
|
|
return QPDFObject::ot_boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
char const*
|
|
|
|
QPDF_Bool::getTypeName() const
|
|
|
|
{
|
|
|
|
return "boolean";
|
|
|
|
}
|
|
|
|
|
2008-04-29 12:55:25 +00:00
|
|
|
bool
|
|
|
|
QPDF_Bool::getVal() const
|
|
|
|
{
|
|
|
|
return this->val;
|
|
|
|
}
|