Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Side by Side Diff: core/fpdfapi/fpdf_parser/include/cpdf_array.h

Issue 2226113002: Add CPDF_Array::IsEmpty(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add CPDF_Array::IsEmpty(). Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_doc.cpp ('k') | core/fpdfdoc/cpdf_formfield.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_ARRAY_H_ 7 #ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_ARRAY_H_
8 #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_ARRAY_H_ 8 #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_ARRAY_H_
9 9
10 #include <vector> 10 #include <vector>
(...skipping 10 matching lines...) Expand all
21 21
22 CPDF_Array(); 22 CPDF_Array();
23 23
24 // CPDF_Object. 24 // CPDF_Object.
25 Type GetType() const override; 25 Type GetType() const override;
26 CPDF_Object* Clone(FX_BOOL bDirect = FALSE) const override; 26 CPDF_Object* Clone(FX_BOOL bDirect = FALSE) const override;
27 bool IsArray() const override; 27 bool IsArray() const override;
28 CPDF_Array* AsArray() override; 28 CPDF_Array* AsArray() override;
29 const CPDF_Array* AsArray() const override; 29 const CPDF_Array* AsArray() const override;
30 30
31 bool IsEmpty() const { return m_Objects.empty(); }
31 size_t GetCount() const { return m_Objects.size(); } 32 size_t GetCount() const { return m_Objects.size(); }
32 CPDF_Object* GetObjectAt(size_t index) const; 33 CPDF_Object* GetObjectAt(size_t index) const;
33 CPDF_Object* GetDirectObjectAt(size_t index) const; 34 CPDF_Object* GetDirectObjectAt(size_t index) const;
34 CFX_ByteString GetStringAt(size_t index) const; 35 CFX_ByteString GetStringAt(size_t index) const;
35 int GetIntegerAt(size_t index) const; 36 int GetIntegerAt(size_t index) const;
36 FX_FLOAT GetNumberAt(size_t index) const; 37 FX_FLOAT GetNumberAt(size_t index) const;
37 CPDF_Dictionary* GetDictAt(size_t index) const; 38 CPDF_Dictionary* GetDictAt(size_t index) const;
38 CPDF_Stream* GetStreamAt(size_t index) const; 39 CPDF_Stream* GetStreamAt(size_t index) const;
39 CPDF_Array* GetArrayAt(size_t index) const; 40 CPDF_Array* GetArrayAt(size_t index) const;
40 FX_FLOAT GetFloatAt(size_t index) const { return GetNumberAt(index); } 41 FX_FLOAT GetFloatAt(size_t index) const { return GetNumberAt(index); }
(...skipping 23 matching lines...) Expand all
64 const_iterator begin() const { return m_Objects.begin(); } 65 const_iterator begin() const { return m_Objects.begin(); }
65 const_iterator end() const { return m_Objects.end(); } 66 const_iterator end() const { return m_Objects.end(); }
66 67
67 protected: 68 protected:
68 ~CPDF_Array() override; 69 ~CPDF_Array() override;
69 70
70 std::vector<CPDF_Object*> m_Objects; 71 std::vector<CPDF_Object*> m_Objects;
71 }; 72 };
72 73
73 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_ARRAY_H_ 74 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_ARRAY_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_doc.cpp ('k') | core/fpdfdoc/cpdf_formfield.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698