Tom Sepez | 5fc239a | 2016-03-10 14:10:38 -0800 | [diff] [blame] | 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 | |
Dan Sinclair | aa403d3 | 2016-03-15 14:57:22 -0400 | [diff] [blame] | 7 | #ifndef CORE_FPDFAPI_FPDF_PARSER_CPDF_BOOLEAN_H_ |
| 8 | #define CORE_FPDFAPI_FPDF_PARSER_CPDF_BOOLEAN_H_ |
Tom Sepez | 5fc239a | 2016-03-10 14:10:38 -0800 | [diff] [blame] | 9 | |
Dan Sinclair | aa403d3 | 2016-03-15 14:57:22 -0400 | [diff] [blame] | 10 | #include "core/fpdfapi/fpdf_parser/include/cpdf_object.h" |
Dan Sinclair | a8a28e0 | 2016-03-23 15:41:39 -0400 | [diff] [blame] | 11 | #include "core/fxcrt/include/fx_string.h" |
| 12 | #include "core/fxcrt/include/fx_system.h" |
Tom Sepez | 5fc239a | 2016-03-10 14:10:38 -0800 | [diff] [blame] | 13 | |
| 14 | class CPDF_Boolean : public CPDF_Object { |
| 15 | public: |
| 16 | CPDF_Boolean(); |
thestig | ded3634 | 2016-05-23 17:54:02 -0700 | [diff] [blame^] | 17 | explicit CPDF_Boolean(bool value); |
Tom Sepez | 5fc239a | 2016-03-10 14:10:38 -0800 | [diff] [blame] | 18 | |
| 19 | // CPDF_Object. |
| 20 | Type GetType() const override; |
| 21 | CPDF_Object* Clone(FX_BOOL bDirect = FALSE) const override; |
| 22 | CFX_ByteString GetString() const override; |
| 23 | int GetInteger() const override; |
| 24 | void SetString(const CFX_ByteString& str) override; |
| 25 | bool IsBoolean() const override; |
| 26 | CPDF_Boolean* AsBoolean() override; |
| 27 | const CPDF_Boolean* AsBoolean() const override; |
| 28 | |
| 29 | protected: |
| 30 | ~CPDF_Boolean() override; |
| 31 | |
thestig | ded3634 | 2016-05-23 17:54:02 -0700 | [diff] [blame^] | 32 | bool m_bValue; |
Tom Sepez | 5fc239a | 2016-03-10 14:10:38 -0800 | [diff] [blame] | 33 | }; |
| 34 | |
Dan Sinclair | aa403d3 | 2016-03-15 14:57:22 -0400 | [diff] [blame] | 35 | #endif // CORE_FPDFAPI_FPDF_PARSER_CPDF_BOOLEAN_H_ |