summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_annotiteration.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2017-01-11 14:03:54 -0800
committerCommit bot <commit-bot@chromium.org>2017-01-11 14:03:54 -0800
commitd805eec52f6ac574918748c4270873e7e5cde596 (patch)
tree3dec3245638de8600bd9a213887be92cc53a1d76 /fpdfsdk/cpdfsdk_annotiteration.h
parent5e3121beff936df1b0af3749447eeda1666d5d76 (diff)
downloadpdfium-d805eec52f6ac574918748c4270873e7e5cde596.tar.xz
Use observed pointers in CPDFSDK_AnnotIterator.chromium/2979
Rename to CPDFSDK_AnnotIteration, as it is now an ordered set of annots, and not the iterator itself. Review-Url: https://codereview.chromium.org/2626073005
Diffstat (limited to 'fpdfsdk/cpdfsdk_annotiteration.h')
-rw-r--r--fpdfsdk/cpdfsdk_annotiteration.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/fpdfsdk/cpdfsdk_annotiteration.h b/fpdfsdk/cpdfsdk_annotiteration.h
new file mode 100644
index 0000000000..70edfd10ae
--- /dev/null
+++ b/fpdfsdk/cpdfsdk_annotiteration.h
@@ -0,0 +1,31 @@
+// Copyright 2017 PDFium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
+
+#ifndef FPDFSDK_CPDFSDK_ANNOTITERATION_H_
+#define FPDFSDK_CPDFSDK_ANNOTITERATION_H_
+
+#include <vector>
+
+#include "fpdfsdk/cpdfsdk_annot.h"
+
+class CPDFSDK_PageView;
+
+class CPDFSDK_AnnotIteration {
+ public:
+ using const_iterator =
+ std::vector<CPDFSDK_Annot::ObservedPtr>::const_iterator;
+
+ CPDFSDK_AnnotIteration(CPDFSDK_PageView* pPageView, bool bReverse);
+ ~CPDFSDK_AnnotIteration();
+
+ const_iterator begin() const { return m_List.begin(); }
+ const_iterator end() const { return m_List.end(); }
+
+ private:
+ std::vector<CPDFSDK_Annot::ObservedPtr> m_List;
+};
+
+#endif // FPDFSDK_CPDFSDK_ANNOTITERATION_H_