Home | History | Annotate | Download | only in parser
      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_null.h"
      8 #include "core/fxcrt/fx_stream.h"
      9 #include "third_party/base/ptr_util.h"
     10 
     11 CPDF_Null::CPDF_Null() {}
     12 
     13 CPDF_Object::Type CPDF_Null::GetType() const {
     14   return NULLOBJ;
     15 }
     16 
     17 std::unique_ptr<CPDF_Object> CPDF_Null::Clone() const {
     18   return pdfium::MakeUnique<CPDF_Null>();
     19 }
     20 
     21 bool CPDF_Null::WriteTo(IFX_ArchiveStream* archive) const {
     22   return archive->WriteString(" null");
     23 }
     24 
     25 bool CPDF_Null::IsNull() const {
     26   return true;
     27 }
     28