mirror of
https://github.com/qpdf/qpdf.git
synced 2024-06-03 19:00:51 +00:00
91cb7c0a58
git-svn-id: svn+q:///qpdf/trunk@651 71b93d88-0707-0410-a8cf-f5a4172ac649
36 lines
999 B
C++
36 lines
999 B
C++
|
|
#ifndef __QPDF_DICTIONARY_HH__
|
|
#define __QPDF_DICTIONARY_HH__
|
|
|
|
#include <qpdf/QPDFObject.hh>
|
|
|
|
#include <set>
|
|
#include <map>
|
|
|
|
#include <qpdf/QPDFObjectHandle.hh>
|
|
|
|
class QPDF_Dictionary: public QPDFObject
|
|
{
|
|
public:
|
|
QPDF_Dictionary(std::map<std::string, QPDFObjectHandle> const& items);
|
|
virtual ~QPDF_Dictionary();
|
|
virtual std::string unparse();
|
|
|
|
// hasKey() and getKeys() treat keys with null values as if they
|
|
// aren't there. getKey() returns null for the value of a
|
|
// non-existent key. This is as per the PDF spec.
|
|
bool hasKey(std::string const&);
|
|
QPDFObjectHandle getKey(std::string const&);
|
|
std::set<std::string> getKeys();
|
|
|
|
// Replace value of key, adding it if it does not exist
|
|
void replaceKey(std::string const& key, QPDFObjectHandle const&);
|
|
// Remove key, doing nothing if key does not exist
|
|
void removeKey(std::string const& key);
|
|
|
|
private:
|
|
std::map<std::string, QPDFObjectHandle> items;
|
|
};
|
|
|
|
#endif // __QPDF_DICTIONARY_HH__
|