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 | |
dsinclair | 488b7ad | 2016-10-04 11:55:50 -0700 | [diff] [blame^] | 7 | #ifndef CORE_FPDFAPI_PARSER_CPDF_BOOLEAN_H_ |
| 8 | #define CORE_FPDFAPI_PARSER_CPDF_BOOLEAN_H_ |
Tom Sepez | 5fc239a | 2016-03-10 14:10:38 -0800 | [diff] [blame] | 9 | |
dsinclair | 488b7ad | 2016-10-04 11:55:50 -0700 | [diff] [blame^] | 10 | #include "core/fpdfapi/parser/cpdf_object.h" |
dsinclair | a52ab74 | 2016-09-29 13:59:29 -0700 | [diff] [blame] | 11 | #include "core/fxcrt/fx_string.h" |
| 12 | #include "core/fxcrt/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; |
weili | a470b5e | 2016-08-23 22:08:37 -0700 | [diff] [blame] | 21 | CPDF_Object* Clone() const override; |
Tom Sepez | 5fc239a | 2016-03-10 14:10:38 -0800 | [diff] [blame] | 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 | |
dsinclair | 488b7ad | 2016-10-04 11:55:50 -0700 | [diff] [blame^] | 35 | #endif // CORE_FPDFAPI_PARSER_CPDF_BOOLEAN_H_ |