summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser/include/cpdf_array.h
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-09-29 12:01:30 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-29 12:01:30 -0700
commitc6c425af1156587fd9b770e5d40bc087df0c63d8 (patch)
treeb73f313c39cd2b1a275a0f9e1ad7206baf5f95d1 /core/fpdfapi/fpdf_parser/include/cpdf_array.h
parent8a752ab21daa2dcd0314ab5e3908f8d6e7bba2b7 (diff)
downloadpdfium-c6c425af1156587fd9b770e5d40bc087df0c63d8.tar.xz
Move core/fpdfapi/fpdf_parser/include to core/fpdfapi/fpdf_parser
BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2383543002
Diffstat (limited to 'core/fpdfapi/fpdf_parser/include/cpdf_array.h')
-rw-r--r--core/fpdfapi/fpdf_parser/include/cpdf_array.h72
1 files changed, 0 insertions, 72 deletions
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_array.h b/core/fpdfapi/fpdf_parser/include/cpdf_array.h
deleted file mode 100644
index a63c40cddb..0000000000
--- a/core/fpdfapi/fpdf_parser/include/cpdf_array.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright 2016 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 CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_ARRAY_H_
-#define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_ARRAY_H_
-
-#include <set>
-#include <vector>
-
-#include "core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h"
-#include "core/fpdfapi/fpdf_parser/include/cpdf_object.h"
-#include "core/fxcrt/include/fx_basic.h"
-#include "core/fxcrt/include/fx_coordinates.h"
-
-class CPDF_Array : public CPDF_Object {
- public:
- using iterator = std::vector<CPDF_Object*>::iterator;
- using const_iterator = std::vector<CPDF_Object*>::const_iterator;
-
- CPDF_Array();
-
- // CPDF_Object.
- Type GetType() const override;
- CPDF_Object* Clone() const override;
- bool IsArray() const override;
- CPDF_Array* AsArray() override;
- const CPDF_Array* AsArray() const override;
-
- bool IsEmpty() const { return m_Objects.empty(); }
- size_t GetCount() const { return m_Objects.size(); }
- CPDF_Object* GetObjectAt(size_t index) const;
- CPDF_Object* GetDirectObjectAt(size_t index) const;
- CFX_ByteString GetStringAt(size_t index) const;
- int GetIntegerAt(size_t index) const;
- FX_FLOAT GetNumberAt(size_t index) const;
- CPDF_Dictionary* GetDictAt(size_t index) const;
- CPDF_Stream* GetStreamAt(size_t index) const;
- CPDF_Array* GetArrayAt(size_t index) const;
- FX_FLOAT GetFloatAt(size_t index) const { return GetNumberAt(index); }
- CFX_Matrix GetMatrix();
- CFX_FloatRect GetRect();
-
- void SetAt(size_t index, CPDF_Object* pObj);
- void InsertAt(size_t index, CPDF_Object* pObj);
- void RemoveAt(size_t index, size_t nCount = 1);
-
- void Add(CPDF_Object* pObj);
- void AddNumber(FX_FLOAT f);
- void AddInteger(int i);
- void AddString(const CFX_ByteString& str);
- void AddName(const CFX_ByteString& str);
- void AddReference(CPDF_IndirectObjectHolder* pDoc, uint32_t objnum);
-
- iterator begin() { return m_Objects.begin(); }
- iterator end() { return m_Objects.end(); }
- const_iterator begin() const { return m_Objects.begin(); }
- const_iterator end() const { return m_Objects.end(); }
-
- protected:
- ~CPDF_Array() override;
-
- CPDF_Object* CloneNonCyclic(
- bool bDirect,
- std::set<const CPDF_Object*>* pVisited) const override;
-
- std::vector<CPDF_Object*> m_Objects;
-};
-
-#endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_ARRAY_H_