diff options
author | Jay Berkenbilt <ejb@ql.org> | 2013-01-22 15:57:07 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2013-01-22 16:01:45 +0100 |
commit | 913eb5ac35011b3d28c653b6f89d936c8f99c844 (patch) | |
tree | ded1a2e1b5f9fcdf6a5e77e44e30aa528be306be /libqpdf/qpdf | |
parent | f81152311e5737e5e0de9dd9462311f306c6921b (diff) | |
download | qpdf-913eb5ac35011b3d28c653b6f89d936c8f99c844.tar.zst |
Add getTypeCode() and getTypeName()
Add virtual methods to QPDFObject, wrappers to QPDFObjectHandle, and
implementations to all the QPDF_Object types.
Diffstat (limited to 'libqpdf/qpdf')
-rw-r--r-- | libqpdf/qpdf/QPDF_Array.hh | 2 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDF_Bool.hh | 2 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDF_Dictionary.hh | 2 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDF_InlineImage.hh | 2 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDF_Integer.hh | 2 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDF_Keyword.hh | 2 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDF_Name.hh | 2 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDF_Null.hh | 2 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDF_Real.hh | 2 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDF_Reserved.hh | 2 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDF_Stream.hh | 2 | ||||
-rw-r--r-- | libqpdf/qpdf/QPDF_String.hh | 2 |
12 files changed, 24 insertions, 0 deletions
diff --git a/libqpdf/qpdf/QPDF_Array.hh b/libqpdf/qpdf/QPDF_Array.hh index 338f6eb2..e81f8664 100644 --- a/libqpdf/qpdf/QPDF_Array.hh +++ b/libqpdf/qpdf/QPDF_Array.hh @@ -12,6 +12,8 @@ class QPDF_Array: public QPDFObject QPDF_Array(std::vector<QPDFObjectHandle> const& items); virtual ~QPDF_Array(); virtual std::string unparse(); + virtual QPDFObject::object_type_e getTypeCode() const; + virtual char const* getTypeName() const; int getNItems() const; QPDFObjectHandle getItem(int n) const; diff --git a/libqpdf/qpdf/QPDF_Bool.hh b/libqpdf/qpdf/QPDF_Bool.hh index 90dc590e..2ec8eb10 100644 --- a/libqpdf/qpdf/QPDF_Bool.hh +++ b/libqpdf/qpdf/QPDF_Bool.hh @@ -9,6 +9,8 @@ class QPDF_Bool: public QPDFObject QPDF_Bool(bool val); virtual ~QPDF_Bool(); virtual std::string unparse(); + virtual QPDFObject::object_type_e getTypeCode() const; + virtual char const* getTypeName() const; bool getVal() const; private: diff --git a/libqpdf/qpdf/QPDF_Dictionary.hh b/libqpdf/qpdf/QPDF_Dictionary.hh index af9f7f09..5b5630cf 100644 --- a/libqpdf/qpdf/QPDF_Dictionary.hh +++ b/libqpdf/qpdf/QPDF_Dictionary.hh @@ -14,6 +14,8 @@ class QPDF_Dictionary: public QPDFObject QPDF_Dictionary(std::map<std::string, QPDFObjectHandle> const& items); virtual ~QPDF_Dictionary(); virtual std::string unparse(); + virtual QPDFObject::object_type_e getTypeCode() const; + virtual char const* getTypeName() const; // hasKey() and getKeys() treat keys with null values as if they // aren't there. getKey() returns null for the value of a diff --git a/libqpdf/qpdf/QPDF_InlineImage.hh b/libqpdf/qpdf/QPDF_InlineImage.hh index 6408a2f1..6be034a9 100644 --- a/libqpdf/qpdf/QPDF_InlineImage.hh +++ b/libqpdf/qpdf/QPDF_InlineImage.hh @@ -9,6 +9,8 @@ class QPDF_InlineImage: public QPDFObject QPDF_InlineImage(std::string const& val); virtual ~QPDF_InlineImage(); virtual std::string unparse(); + virtual QPDFObject::object_type_e getTypeCode() const; + virtual char const* getTypeName() const; std::string getVal() const; private: diff --git a/libqpdf/qpdf/QPDF_Integer.hh b/libqpdf/qpdf/QPDF_Integer.hh index f9964693..091392ab 100644 --- a/libqpdf/qpdf/QPDF_Integer.hh +++ b/libqpdf/qpdf/QPDF_Integer.hh @@ -9,6 +9,8 @@ class QPDF_Integer: public QPDFObject QPDF_Integer(long long val); virtual ~QPDF_Integer(); virtual std::string unparse(); + virtual QPDFObject::object_type_e getTypeCode() const; + virtual char const* getTypeName() const; long long getVal() const; private: diff --git a/libqpdf/qpdf/QPDF_Keyword.hh b/libqpdf/qpdf/QPDF_Keyword.hh index 1a5c0ee6..78ae5791 100644 --- a/libqpdf/qpdf/QPDF_Keyword.hh +++ b/libqpdf/qpdf/QPDF_Keyword.hh @@ -9,6 +9,8 @@ class QPDF_Keyword: public QPDFObject QPDF_Keyword(std::string const& val); virtual ~QPDF_Keyword(); virtual std::string unparse(); + virtual QPDFObject::object_type_e getTypeCode() const; + virtual char const* getTypeName() const; std::string getVal() const; private: diff --git a/libqpdf/qpdf/QPDF_Name.hh b/libqpdf/qpdf/QPDF_Name.hh index 361556a0..5f50c41d 100644 --- a/libqpdf/qpdf/QPDF_Name.hh +++ b/libqpdf/qpdf/QPDF_Name.hh @@ -9,6 +9,8 @@ class QPDF_Name: public QPDFObject QPDF_Name(std::string const& name); virtual ~QPDF_Name(); virtual std::string unparse(); + virtual QPDFObject::object_type_e getTypeCode() const; + virtual char const* getTypeName() const; std::string getName() const; // Put # into strings with characters unsuitable for name token diff --git a/libqpdf/qpdf/QPDF_Null.hh b/libqpdf/qpdf/QPDF_Null.hh index dffe0260..16ca4755 100644 --- a/libqpdf/qpdf/QPDF_Null.hh +++ b/libqpdf/qpdf/QPDF_Null.hh @@ -8,6 +8,8 @@ class QPDF_Null: public QPDFObject public: virtual ~QPDF_Null(); virtual std::string unparse(); + virtual QPDFObject::object_type_e getTypeCode() const; + virtual char const* getTypeName() const; }; #endif // __QPDF_NULL_HH__ diff --git a/libqpdf/qpdf/QPDF_Real.hh b/libqpdf/qpdf/QPDF_Real.hh index 2895cee5..d59ed982 100644 --- a/libqpdf/qpdf/QPDF_Real.hh +++ b/libqpdf/qpdf/QPDF_Real.hh @@ -10,6 +10,8 @@ class QPDF_Real: public QPDFObject QPDF_Real(double value, int decimal_places = 0); virtual ~QPDF_Real(); virtual std::string unparse(); + virtual QPDFObject::object_type_e getTypeCode() const; + virtual char const* getTypeName() const; std::string getVal(); private: diff --git a/libqpdf/qpdf/QPDF_Reserved.hh b/libqpdf/qpdf/QPDF_Reserved.hh index b149f776..8dbf4fe4 100644 --- a/libqpdf/qpdf/QPDF_Reserved.hh +++ b/libqpdf/qpdf/QPDF_Reserved.hh @@ -8,6 +8,8 @@ class QPDF_Reserved: public QPDFObject public: virtual ~QPDF_Reserved(); virtual std::string unparse(); + virtual QPDFObject::object_type_e getTypeCode() const; + virtual char const* getTypeName() const; }; #endif // __QPDF_RESERVED_HH__ diff --git a/libqpdf/qpdf/QPDF_Stream.hh b/libqpdf/qpdf/QPDF_Stream.hh index 6e5dacf0..5a5d555b 100644 --- a/libqpdf/qpdf/QPDF_Stream.hh +++ b/libqpdf/qpdf/QPDF_Stream.hh @@ -17,6 +17,8 @@ class QPDF_Stream: public QPDFObject qpdf_offset_t offset, size_t length); virtual ~QPDF_Stream(); virtual std::string unparse(); + virtual QPDFObject::object_type_e getTypeCode() const; + virtual char const* getTypeName() const; QPDFObjectHandle getDict() const; // See comments in QPDFObjectHandle.hh for these methods. diff --git a/libqpdf/qpdf/QPDF_String.hh b/libqpdf/qpdf/QPDF_String.hh index 82860e9d..abf8291a 100644 --- a/libqpdf/qpdf/QPDF_String.hh +++ b/libqpdf/qpdf/QPDF_String.hh @@ -11,6 +11,8 @@ class QPDF_String: public QPDFObject QPDF_String(std::string const& val); virtual ~QPDF_String(); virtual std::string unparse(); + virtual QPDFObject::object_type_e getTypeCode() const; + virtual char const* getTypeName() const; std::string unparse(bool force_binary); std::string getVal() const; std::string getUTF8Val() const; |