2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-09-21 01:29:06 +00:00
qpdf/libqpdf/qpdf/ResourceFinder.hh
Jay Berkenbilt 12f1eb15ca Programmatically apply new formatting to code
Run this:

for i in  **/*.cc **/*.c **/*.h **/*.hh; do
  clang-format < $i >| $i.new && mv $i.new $i
done
2022-04-04 08:10:40 -04:00

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