Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cfx_xmlinstruction.h
Go to the documentation of this file.
1// Copyright 2017 The PDFium Authors
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#ifndef CORE_FXCRT_XML_CFX_XMLINSTRUCTION_H_
8#define CORE_FXCRT_XML_CFX_XMLINSTRUCTION_H_
9
10#include <vector>
11
12#include "core/fxcrt/widestring.h"
13#include "core/fxcrt/xml/cfx_xmlnode.h"
14
15class CFX_XMLDocument;
16
17class CFX_XMLInstruction final : public CFX_XMLNode {
18 public:
19 explicit CFX_XMLInstruction(const WideString& wsTarget);
21
22 // CFX_XMLNode
23 Type GetType() const override;
24 CFX_XMLNode* Clone(CFX_XMLDocument* doc) override;
25 void Save(const RetainPtr<IFX_RetainableWriteStream>& pXMLStream) override;
26
27 bool IsOriginalXFAVersion() const;
28 bool IsAcrobat() const;
29
30 const std::vector<WideString>& GetTargetData() const { return target_data_; }
31 void AppendData(const WideString& wsData);
32
33 private:
34 const WideString name_;
35 std::vector<WideString> target_data_;
36};
37
38inline CFX_XMLInstruction* ToXMLInstruction(CFX_XMLNode* pNode) {
39 return pNode && pNode->GetType() == CFX_XMLNode::Type::kInstruction
40 ? static_cast<CFX_XMLInstruction*>(pNode)
41 : nullptr;
42}
43
44#endif // CORE_FXCRT_XML_CFX_XMLINSTRUCTION_H_
CFX_XMLInstruction * ToXMLInstruction(CFX_XMLNode *pNode)
void AppendNodesFrom(CFX_XMLDocument *other)
void AppendData(const WideString &wsData)
CFX_XMLInstruction(const WideString &wsTarget)
const std::vector< WideString > & GetTargetData() const
Type GetType() const override
bool IsOriginalXFAVersion() const
CFX_XMLNode * Clone(CFX_XMLDocument *doc) override
~CFX_XMLInstruction() override
void Save(const RetainPtr< IFX_RetainableWriteStream > &pXMLStream) override
virtual Type GetType() const =0