diff options
author | Jay Berkenbilt <jberkenbilt@users.noreply.github.com> | 2022-07-24 20:41:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-24 20:41:33 +0200 |
commit | 5696a507b6dacf34d066810a3f2fca3525eb02f5 (patch) | |
tree | b0009760e0f76c28aa99581e4bc6087adf93749f /libqpdf/QPDFObjGen.cc | |
parent | 6f1041afb8e6d1f57169cd4c79f42a7c1ce94da8 (diff) | |
parent | 8b4afa428e9caa1a34cad434dfe8a3e01e5a24d3 (diff) | |
download | qpdf-5696a507b6dacf34d066810a3f2fca3525eb02f5.tar.zst |
Merge pull request #731 from m-holger/og_unparse
Tidy QPDFObjGen related code
Diffstat (limited to 'libqpdf/QPDFObjGen.cc')
-rw-r--r-- | libqpdf/QPDFObjGen.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libqpdf/QPDFObjGen.cc b/libqpdf/QPDFObjGen.cc new file mode 100644 index 00000000..e372555d --- /dev/null +++ b/libqpdf/QPDFObjGen.cc @@ -0,0 +1,17 @@ +#include <qpdf/QPDFObjGen.hh> + +#include <qpdf/QUtil.hh> + +std::ostream& +operator<<(std::ostream& os, const QPDFObjGen& og) +{ + os << og.obj << "," << og.gen; + return os; +} + +std::string +QPDFObjGen::unparse(char separator) const +{ + return QUtil::int_to_string(this->obj) + separator + + QUtil::int_to_string(this->gen); +} |