2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-01 09:50:54 +00:00
qpdf/libqpdf/Pl_String.cc
m-holger 85d784952f Globally replace 'this->m->' with 'm->'
Using search and replace.
2023-05-21 14:42:34 +01:00

38 lines
647 B
C++

#include <qpdf/Pl_String.hh>
#include <stdexcept>
Pl_String::Members::Members(std::string& s) :
s(s)
{
}
Pl_String::Pl_String(char const* identifier, Pipeline* next, std::string& s) :
Pipeline(identifier, next),
m(new Members(s))
{
}
Pl_String::~Pl_String()
{
// Must be explicit and not inline -- see QPDF_DLL_CLASS in
// README-maintainer
}
void
Pl_String::write(unsigned char const* buf, size_t len)
{
m->s.append(reinterpret_cast<char const*>(buf), len);
if (getNext(true)) {
getNext()->write(buf, len);
}
}
void
Pl_String::finish()
{
if (getNext(true)) {
getNext()->finish();
}
}