1 // Copyright 2016 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #include "core/fpdfapi/parser/cpdf_object.h"
8 
9 #include <algorithm>
10 
11 #include "core/fpdfapi/parser/cpdf_array.h"
12 #include "core/fpdfapi/parser/cpdf_dictionary.h"
13 #include "core/fpdfapi/parser/cpdf_indirect_object_holder.h"
14 #include "core/fpdfapi/parser/cpdf_parser.h"
15 #include "core/fpdfapi/parser/fpdf_parser_decode.h"
16 #include "core/fxcrt/fx_string.h"
17 #include "third_party/base/stl_util.h"
18 
~CPDF_Object()19 CPDF_Object::~CPDF_Object() {}
20 
GetDirect() const21 CPDF_Object* CPDF_Object::GetDirect() const {
22   return const_cast<CPDF_Object*>(this);
23 }
24 
CloneObjectNonCyclic(bool bDirect) const25 std::unique_ptr<CPDF_Object> CPDF_Object::CloneObjectNonCyclic(
26     bool bDirect) const {
27   std::set<const CPDF_Object*> visited_objs;
28   return CloneNonCyclic(bDirect, &visited_objs);
29 }
30 
CloneDirectObject() const31 std::unique_ptr<CPDF_Object> CPDF_Object::CloneDirectObject() const {
32   return CloneObjectNonCyclic(true);
33 }
34 
CloneNonCyclic(bool bDirect,std::set<const CPDF_Object * > * pVisited) const35 std::unique_ptr<CPDF_Object> CPDF_Object::CloneNonCyclic(
36     bool bDirect,
37     std::set<const CPDF_Object*>* pVisited) const {
38   return Clone();
39 }
40 
GetString() const41 CFX_ByteString CPDF_Object::GetString() const {
42   return CFX_ByteString();
43 }
44 
GetUnicodeText() const45 CFX_WideString CPDF_Object::GetUnicodeText() const {
46   return CFX_WideString();
47 }
48 
GetNumber() const49 FX_FLOAT CPDF_Object::GetNumber() const {
50   return 0;
51 }
52 
GetInteger() const53 int CPDF_Object::GetInteger() const {
54   return 0;
55 }
56 
GetDict() const57 CPDF_Dictionary* CPDF_Object::GetDict() const {
58   return nullptr;
59 }
60 
SetString(const CFX_ByteString & str)61 void CPDF_Object::SetString(const CFX_ByteString& str) {
62   ASSERT(false);
63 }
64 
IsArray() const65 bool CPDF_Object::IsArray() const {
66   return false;
67 }
68 
IsBoolean() const69 bool CPDF_Object::IsBoolean() const {
70   return false;
71 }
72 
IsDictionary() const73 bool CPDF_Object::IsDictionary() const {
74   return false;
75 }
76 
IsName() const77 bool CPDF_Object::IsName() const {
78   return false;
79 }
80 
IsNumber() const81 bool CPDF_Object::IsNumber() const {
82   return false;
83 }
84 
IsReference() const85 bool CPDF_Object::IsReference() const {
86   return false;
87 }
88 
IsStream() const89 bool CPDF_Object::IsStream() const {
90   return false;
91 }
92 
IsString() const93 bool CPDF_Object::IsString() const {
94   return false;
95 }
96 
AsArray()97 CPDF_Array* CPDF_Object::AsArray() {
98   return nullptr;
99 }
100 
AsArray() const101 const CPDF_Array* CPDF_Object::AsArray() const {
102   return nullptr;
103 }
104 
AsBoolean()105 CPDF_Boolean* CPDF_Object::AsBoolean() {
106   return nullptr;
107 }
108 
AsBoolean() const109 const CPDF_Boolean* CPDF_Object::AsBoolean() const {
110   return nullptr;
111 }
112 
AsDictionary()113 CPDF_Dictionary* CPDF_Object::AsDictionary() {
114   return nullptr;
115 }
116 
AsDictionary() const117 const CPDF_Dictionary* CPDF_Object::AsDictionary() const {
118   return nullptr;
119 }
120 
AsName()121 CPDF_Name* CPDF_Object::AsName() {
122   return nullptr;
123 }
124 
AsName() const125 const CPDF_Name* CPDF_Object::AsName() const {
126   return nullptr;
127 }
128 
AsNumber()129 CPDF_Number* CPDF_Object::AsNumber() {
130   return nullptr;
131 }
132 
AsNumber() const133 const CPDF_Number* CPDF_Object::AsNumber() const {
134   return nullptr;
135 }
136 
AsReference()137 CPDF_Reference* CPDF_Object::AsReference() {
138   return nullptr;
139 }
140 
AsReference() const141 const CPDF_Reference* CPDF_Object::AsReference() const {
142   return nullptr;
143 }
144 
AsStream()145 CPDF_Stream* CPDF_Object::AsStream() {
146   return nullptr;
147 }
148 
AsStream() const149 const CPDF_Stream* CPDF_Object::AsStream() const {
150   return nullptr;
151 }
152 
AsString()153 CPDF_String* CPDF_Object::AsString() {
154   return nullptr;
155 }
156 
AsString() const157 const CPDF_String* CPDF_Object::AsString() const {
158   return nullptr;
159 }
160