diff options
author | m-holger <m-holger@kubitscheck.org> | 2023-02-09 13:43:56 +0100 |
---|---|---|
committer | m-holger <m-holger@kubitscheck.org> | 2023-02-18 09:33:08 +0100 |
commit | dab27c9bb35c26e30e22f2e53299ee9566cadefd (patch) | |
tree | d9a0c711329c495442c26e0ca2697847cdf2feeb /libqpdf/qpdf/QPDFValue.hh | |
parent | fe74f28dc4f269e4bf944ae61d77874f81f95daf (diff) | |
download | qpdf-dab27c9bb35c26e30e22f2e53299ee9566cadefd.tar.zst |
Refactor setting of object descriptions in QPDF::JSONReactor
Diffstat (limited to 'libqpdf/qpdf/QPDFValue.hh')
-rw-r--r-- | libqpdf/qpdf/QPDFValue.hh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/libqpdf/qpdf/QPDFValue.hh b/libqpdf/qpdf/QPDFValue.hh index 8e9d4ea5..2e0c5e8d 100644 --- a/libqpdf/qpdf/QPDFValue.hh +++ b/libqpdf/qpdf/QPDFValue.hh @@ -14,6 +14,18 @@ class QPDF; class QPDFObjectHandle; class QPDFObject; +struct JSON_Descr +{ + JSON_Descr(std::shared_ptr<std::string> input, std::string const& object) : + input(input), + object(object) + { + } + + std::shared_ptr<std::string> input; + std::string object; +}; + class QPDFValue { friend class QPDFObject; @@ -25,7 +37,7 @@ class QPDFValue virtual std::string unparse() = 0; virtual JSON getJSON(int json_version) = 0; - using Description = std::variant<std::string>; + using Description = std::variant<std::string, JSON_Descr>; virtual void setDescription( |