Also added a convenience GetSize() method
---
src/base/PdfDictionary.cpp | 10 ++++++++++
src/base/PdfDictionary.h | 16 +++++++++++++++-
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/src/base/PdfDictionary.cpp b/src/base/PdfDictionary.cpp
index 65ed73a..d2e3da5 100644
--- a/src/base/PdfDictionary.cpp
+++ b/src/base/PdfDictionary.cpp
@@ -364,6 +364,16 @@ void PdfDictionary::SetDirty( bool bDirty )
++it;
}
}
+}
+
+TCIKeyMap PdfDictionary::begin() const
+{
+ return m_mapKeys.begin();
+}
+
+TCIKeyMap PdfDictionary::end() const
+{
+ return m_mapKeys.end();
}
};
diff --git a/src/base/PdfDictionary.h b/src/base/PdfDictionary.h
index 67043af..7a25f5a 100644
--- a/src/base/PdfDictionary.h
+++ b/src/base/PdfDictionary.h
@@ -238,6 +238,11 @@ class PODOFO_API PdfDictionary : public PdfDataType {
*/
void Write( PdfOutputDevice* pDevice, EPdfWriteMode eWriteMode,
const PdfEncrypt* pEncrypt, const PdfName & keyStop =
PdfName::KeyNull ) const;
+
+ /**
+ * \returns the size of the internal map
+ */
+ inline size_t GetSize() const;
/** Get access to the internal map of keys.
*
@@ -270,7 +275,11 @@ class PODOFO_API PdfDictionary : public PdfDataType {
*
* \see IsDirty
*/
- virtual void SetDirty( bool bDirty );
+ virtual void SetDirty( bool bDirty );
+
+ public:
+ TCIKeyMap begin() const;
+ TCIKeyMap end() const;
private:
TKeyMap m_mapKeys;
@@ -281,6 +290,11 @@ class PODOFO_API PdfDictionary : public PdfDataType {
typedef std::vector<PdfDictionary*> TVecDictionaries;
typedef TVecDictionaries::iterator TIVecDictionaries;
typedef TVecDictionaries::const_iterator TCIVecDictionaries;
+
+size_t PdfDictionary::GetSize() const
+{
+ return m_mapKeys.size();
+}
// -----------------------------------------------------
//
--
2.16.1.windows.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users