summaryrefslogtreecommitdiffstats
path: root/libqpdf/qpdf/ResourceFinder.hh
diff options
context:
space:
mode:
Diffstat (limited to 'libqpdf/qpdf/ResourceFinder.hh')
-rw-r--r--libqpdf/qpdf/ResourceFinder.hh22
1 files changed, 22 insertions, 0 deletions
diff --git a/libqpdf/qpdf/ResourceFinder.hh b/libqpdf/qpdf/ResourceFinder.hh
new file mode 100644
index 00000000..0ac74eab
--- /dev/null
+++ b/libqpdf/qpdf/ResourceFinder.hh
@@ -0,0 +1,22 @@
+#ifndef RESOURCEFINDER_HH
+#define RESOURCEFINDER_HH
+
+#include <qpdf/QPDFObjectHandle.hh>
+
+class ResourceFinder: public QPDFObjectHandle::TokenFilter
+{
+ public:
+ ResourceFinder();
+ virtual ~ResourceFinder() = default;
+ virtual void handleToken(QPDFTokenizer::Token const&) override;
+ std::set<std::string> const& getNames() const;
+ bool sawBad() const;
+
+ private:
+ std::string last_name;
+ std::set<std::string> names;
+ std::map<std::string, std::set<std::string>> names_by_resource_type;
+ bool saw_bad;
+};
+
+#endif // RESOURCEFINDER_HH