Coverage Report

Created: 2025-12-05 06:54

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/qpdf/libqpdf/Pipeline.cc
Line
Count
Source
1
#include <qpdf/Pipeline.hh>
2
3
#include <qpdf/Util.hh>
4
5
#include <cstring>
6
#include <stdexcept>
7
8
using namespace qpdf;
9
10
Pipeline::Pipeline(char const* identifier, Pipeline* next) :
11
596k
    identifier(identifier),
12
596k
    next_(next)
13
596k
{
14
596k
}
15
16
Pipeline*
17
Pipeline::getNext(bool allow_null)
18
0
{
19
0
    util::assertion(
20
0
        next_ || allow_null, identifier + ": Pipeline::getNext() called on pipeline with no next");
21
0
    return next_;
22
0
}
23
24
std::string
25
Pipeline::getIdentifier() const
26
0
{
27
0
    return identifier;
28
0
}
29
30
void
31
Pipeline::writeCStr(char const* cstr)
32
2.23M
{
33
2.23M
    write(cstr, strlen(cstr));
34
2.23M
}
35
36
void
37
Pipeline::writeString(std::string const& str)
38
9.20M
{
39
9.20M
    write(str.c_str(), str.length());
40
9.20M
}
41
42
Pipeline&
43
Pipeline::operator<<(char const* cstr)
44
2.22M
{
45
2.22M
    writeCStr(cstr);
46
2.22M
    return *this;
47
2.22M
}
48
49
Pipeline&
50
Pipeline::operator<<(std::string const& str)
51
5.86k
{
52
5.86k
    writeString(str);
53
5.86k
    return *this;
54
5.86k
}
55
56
Pipeline&
57
Pipeline::operator<<(short i)
58
0
{
59
0
    writeString(std::to_string(i));
60
0
    return *this;
61
0
}
62
63
Pipeline&
64
Pipeline::operator<<(int i)
65
0
{
66
0
    writeString(std::to_string(i));
67
0
    return *this;
68
0
}
69
70
Pipeline&
71
Pipeline::operator<<(long i)
72
0
{
73
0
    writeString(std::to_string(i));
74
0
    return *this;
75
0
}
76
77
Pipeline&
78
Pipeline::operator<<(long long i)
79
0
{
80
0
    writeString(std::to_string(i));
81
0
    return *this;
82
0
}
83
84
Pipeline&
85
Pipeline::operator<<(unsigned short i)
86
0
{
87
0
    writeString(std::to_string(i));
88
0
    return *this;
89
0
}
90
91
Pipeline&
92
Pipeline::operator<<(unsigned int i)
93
0
{
94
0
    writeString(std::to_string(i));
95
0
    return *this;
96
0
}
97
98
Pipeline&
99
Pipeline::operator<<(unsigned long i)
100
0
{
101
0
    writeString(std::to_string(i));
102
0
    return *this;
103
0
}
104
105
Pipeline&
106
Pipeline::operator<<(unsigned long long i)
107
0
{
108
0
    writeString(std::to_string(i));
109
0
    return *this;
110
0
}
111
112
void
113
Pipeline::write(char const* data, size_t len)
114
71.4M
{
115
71.4M
    write(reinterpret_cast<unsigned char const*>(data), len);
116
71.4M
}