mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-24 23:58:35 +00:00
07edf96440
Prior to the cmake conversion, several private classes had methods that were exported into the shared library so they could be tested with libtests. With cmake, we build libtests using an object library, so this is no longer necessary. The methods that are disappearing from the ABI were never exposed through public headers, so no code should be using them. Removal had to wait until the window for ABI-breaking changes was open.
31 lines
755 B
C++
31 lines
755 B
C++
#ifndef QPDF_SPARSEOHARRAY_HH
|
|
#define QPDF_SPARSEOHARRAY_HH
|
|
|
|
#include <qpdf/QPDFObjectHandle.hh>
|
|
#include <unordered_map>
|
|
|
|
class SparseOHArray
|
|
{
|
|
public:
|
|
SparseOHArray();
|
|
size_t size() const;
|
|
void append(QPDFObjectHandle oh);
|
|
QPDFObjectHandle at(size_t idx) const;
|
|
void remove_last();
|
|
void releaseResolved();
|
|
void setAt(size_t idx, QPDFObjectHandle oh);
|
|
void erase(size_t idx);
|
|
void insert(size_t idx, QPDFObjectHandle oh);
|
|
|
|
typedef std::unordered_map<size_t, QPDFObjectHandle>::const_iterator
|
|
const_iterator;
|
|
const_iterator begin() const;
|
|
const_iterator end() const;
|
|
|
|
private:
|
|
std::unordered_map<size_t, QPDFObjectHandle> elements;
|
|
size_t n_elements;
|
|
};
|
|
|
|
#endif // QPDF_SPARSEOHARRAY_HH
|