diff options
author | Jay Berkenbilt <ejb@ql.org> | 2021-03-01 22:13:03 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2021-03-03 23:05:49 +0100 |
commit | 37fcc5ff71ef2fc657623d908e50d6b388fae78e (patch) | |
tree | 59b7e7c0b7fee1b128fd1ea1afd7c938d3534189 /libqpdf/qpdf/ResourceFinder.hh | |
parent | b444ab33529b88d4ebaba913923f474c3de2c21b (diff) | |
download | qpdf-37fcc5ff71ef2fc657623d908e50d6b388fae78e.tar.zst |
Create ResourceFinder from NameWatcher in QPDFPageObjectHelper
Diffstat (limited to 'libqpdf/qpdf/ResourceFinder.hh')
-rw-r--r-- | libqpdf/qpdf/ResourceFinder.hh | 22 |
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 |