blob: d037e6003eddb7876682017ec4fb32a077ea3ff2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#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
|