mirror of
https://github.com/qpdf/qpdf.git
synced 2024-10-31 19:02:30 +00:00
12f1eb15ca
Run this: for i in **/*.cc **/*.c **/*.h **/*.hh; do clang-format < $i >| $i.new && mv $i.new $i done
56 lines
843 B
C++
56 lines
843 B
C++
#include <qpdf/QPDFObjGen.hh>
|
|
|
|
#include <qpdf/QUtil.hh>
|
|
|
|
QPDFObjGen::QPDFObjGen() :
|
|
obj(0),
|
|
gen(0)
|
|
{
|
|
}
|
|
|
|
QPDFObjGen::QPDFObjGen(int o, int g) :
|
|
obj(o),
|
|
gen(g)
|
|
{
|
|
}
|
|
|
|
bool
|
|
QPDFObjGen::operator<(QPDFObjGen const& rhs) const
|
|
{
|
|
return (
|
|
(this->obj < rhs.obj) ||
|
|
((this->obj == rhs.obj) && (this->gen < rhs.gen)));
|
|
}
|
|
|
|
bool
|
|
QPDFObjGen::operator==(QPDFObjGen const& rhs) const
|
|
{
|
|
return ((this->obj == rhs.obj) && (this->gen == rhs.gen));
|
|
}
|
|
|
|
int
|
|
QPDFObjGen::getObj() const
|
|
{
|
|
return this->obj;
|
|
}
|
|
|
|
int
|
|
QPDFObjGen::getGen() const
|
|
{
|
|
return this->gen;
|
|
}
|
|
|
|
std::ostream&
|
|
operator<<(std::ostream& os, const QPDFObjGen& og)
|
|
{
|
|
os << og.obj << "," << og.gen;
|
|
return os;
|
|
}
|
|
|
|
std::string
|
|
QPDFObjGen::unparse() const
|
|
{
|
|
return QUtil::int_to_string(this->obj) + "," +
|
|
QUtil::int_to_string(this->gen);
|
|
}
|