| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |