2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-11-15 17:17:08 +00:00
qpdf/libqpdf/Pipeline.cc
Jay Berkenbilt 79f6b4823b Convert remaining public classes to use Members pattern
Have classes contain only a single private member of type
PointerHolder<Members>. This makes it safe to change the structure of
the Members class without breaking binary compatibility. Many of the
classes already follow this pattern quite successfully. This brings in
the rest of the class that are part of the public API.
2019-06-22 10:13:27 -04:00

34 lines
543 B
C++

#include <qpdf/Pipeline.hh>
#include <stdexcept>
Pipeline::Members::Members(Pipeline* next) :
next(next)
{
}
Pipeline::Members::~Members()
{
}
Pipeline::Pipeline(char const* identifier, Pipeline* next) :
identifier(identifier),
m(new Members(next))
{
}
Pipeline::~Pipeline()
{
}
Pipeline*
Pipeline::getNext(bool allow_null)
{
if ((this->m->next == 0) && (! allow_null))
{
throw std::logic_error(
this->identifier +
": Pipeline::getNext() called on pipeline with no next");
}
return this->m->next;
}