From 8a6fdadccd2eedf332ae3a72f0149c1b40cb5bd9 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 9 May 2017 15:03:33 -0700 Subject: 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 Commit-Queue: Tom Sepez --- core/fxcrt/xml/cxml_content.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'core/fxcrt/xml/cxml_content.h') 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; -- cgit v1.2.3