mirror of
https://github.com/qpdf/qpdf.git
synced 2024-11-11 07:30:57 +00:00
79f6b4823b
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.
34 lines
543 B
C++
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;
|
|
}
|