summaryrefslogtreecommitdiff
path: root/core/fxcrt/xml/cxml_content.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-09 15:03:33 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-09 22:24:52 +0000
commit8a6fdadccd2eedf332ae3a72f0149c1b40cb5bd9 (patch)
tree307288716efc81c5b3d5d0e05c380cdd10add95a /core/fxcrt/xml/cxml_content.h
parent392cfd62f6fd6fc505b644b67938ea30131eb837 (diff)
downloadpdfium-8a6fdadccd2eedf332ae3a72f0149c1b40cb5bd9.tar.xz
Create common CXML_Object base class for CXML_Content and CXML_Element.
They should each know what they are rather than having an external ChildRecord struct to track the type. Change-Id: Ic647ba45569764073e944d30af1a96dccdc29eb3 Reviewed-on: https://pdfium-review.googlesource.com/5210 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt/xml/cxml_content.h')
-rw-r--r--core/fxcrt/xml/cxml_content.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/core/fxcrt/xml/cxml_content.h b/core/fxcrt/xml/cxml_content.h
index 261c622eca..641efe6720 100644
--- a/core/fxcrt/xml/cxml_content.h
+++ b/core/fxcrt/xml/cxml_content.h
@@ -7,14 +7,17 @@
#ifndef CORE_FXCRT_XML_CXML_CONTENT_H_
#define CORE_FXCRT_XML_CXML_CONTENT_H_
-class CXML_Content {
+#include "core/fxcrt/fx_string.h"
+#include "core/fxcrt/xml/cxml_object.h"
+
+class CXML_Content : public CXML_Object {
public:
- CXML_Content() : m_bCDATA(false), m_Content() {}
+ CXML_Content(bool bCDATA, const CFX_WideStringC& content);
+ ~CXML_Content() override;
- void Set(bool bCDATA, const CFX_WideStringC& content) {
- m_bCDATA = bCDATA;
- m_Content = content;
- }
+ // CXML_Object:
+ CXML_Content* AsContent() override;
+ const CXML_Content* AsContent() const override;
bool m_bCDATA;
CFX_WideString m_Content;