mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-05 16:12:13 +00:00
12f1eb15ca
Run this: for i in **/*.cc **/*.c **/*.h **/*.hh; do clang-format < $i >| $i.new && mv $i.new $i done
26 lines
734 B
C++
26 lines
734 B
C++
#ifndef RESOURCEFINDER_HH
|
|
#define RESOURCEFINDER_HH
|
|
|
|
#include <qpdf/QPDFObjectHandle.hh>
|
|
|
|
class ResourceFinder: public QPDFObjectHandle::ParserCallbacks
|
|
{
|
|
public:
|
|
ResourceFinder();
|
|
virtual ~ResourceFinder() = default;
|
|
virtual void handleObject(QPDFObjectHandle, size_t, size_t) override;
|
|
virtual 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
|