2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-13 07:32:22 +00:00
qpdf/libqpdf/qpdf/ResourceFinder.hh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
711 B
C++
Raw Normal View History

#ifndef RESOURCEFINDER_HH
#define RESOURCEFINDER_HH
#include <qpdf/QPDFObjectHandle.hh>
class ResourceFinder: public QPDFObjectHandle::ParserCallbacks
{
public:
ResourceFinder();
~ResourceFinder() override = default;
2023-05-20 12:56:33 +00:00
void handleObject(QPDFObjectHandle, size_t, size_t) override;
void handleEOF() override;
std::set<std::string> const& getNames() const;
std::map<std::string, std::map<std::string, std::set<size_t>>> const&
getNamesByResourceType() const;
private:
std::string last_name;
size_t last_name_offset;
std::set<std::string> names;
std::map<std::string, std::map<std::string, std::set<size_t>>> names_by_resource_type;
};
#endif // RESOURCEFINDER_HH