CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
xml_text.h
1
2
3#pragma once
4
5#include <xml/xml_node_type.h>
6#include <xml/xml_character_data.h>
7#include <cstdint>
8
9
11namespace System
12{
13class String;
14namespace Xml
15{
16class XmlDocument;
17class XmlLoader;
18class XmlNode;
19class XmlWriter;
20namespace XPath
21{
22enum class XPathNodeType;
23} // namespace XPath
24} // namespace Xml
25} // namespace System
27
28namespace System {
29
30namespace Xml {
31
36class ASPOSECPP_SHARED_CLASS XmlText : public XmlCharacterData
37{
38 typedef XmlText ThisType;
40
41 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
42 ASPOSECPP_SHARED_RTTI_INFO_DECL();
43
44public:
45
48
49private:
51 friend class XmlDocument;
52 friend class XmlLoader;
54
55public:
56
59 ASPOSECPP_SHARED_API String get_Name() override;
62 ASPOSECPP_SHARED_API String get_LocalName() override;
65 ASPOSECPP_SHARED_API XmlNodeType get_NodeType() override;
68 ASPOSECPP_SHARED_API String get_Value() override;
71 ASPOSECPP_SHARED_API void set_Value(String value) override;
74 ASPOSECPP_SHARED_API SharedPtr<XmlNode> get_PreviousText() override;
75
80 ASPOSECPP_SHARED_API SharedPtr<XmlNode> CloneNode(bool deep) override;
84 virtual ASPOSECPP_SHARED_API SharedPtr<XmlText> SplitText(int32_t offset);
87 ASPOSECPP_SHARED_API void WriteTo(const SharedPtr<XmlWriter>& w) override;
91 ASPOSECPP_SHARED_API void WriteContentTo(const SharedPtr<XmlWriter>& w) override;
92
93protected:
94
96 ASPOSECPP_SHARED_API SharedPtr<XmlNode> get_ParentNodeInternal() override;
97 ASPOSECPP_SHARED_API XPath::XPathNodeType get_XPNodeType() override;
98 ASPOSECPP_SHARED_API bool get_IsText() override;
99
100 XmlText(const String& strData);
101 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(XmlText, CODEPORTING_ARGS(const String& strData));
103
107 ASPOSECPP_SHARED_API XmlText(const String& strData, const SharedPtr<XmlDocument>& doc);
108 ASPOSECPP_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(XmlText, CODEPORTING_ARGS(const String& strData, const SharedPtr<XmlDocument>& doc));
109
110 virtual ASPOSECPP_SHARED_API ~XmlText();
111
112};
113
114} // namespace Xml
115} // namespace System
116
117
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Provides text manipulation methods that are used by several classes.
Definition: xml_character_data.h:36
Represents an XML document. You can use this class to load, validate, edit, add, and position XML in ...
Definition: xml_document.h:100
Returns the node immediately preceding or following this node.
Definition: xml_linked_node.h:32
Represents the text content of an element or attribute.
Definition: xml_text.h:37
String get_LocalName() override
Returns the local name of the node.
XmlNodeType get_NodeType() override
Returns the type of the current node.
void WriteTo(const SharedPtr< XmlWriter > &w) override
Saves the node to the specified XmlWriter.
String get_Value() override
Returns the value of the node.
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(XmlText, CODEPORTING_ARGS(const String &strData, const SharedPtr< XmlDocument > &doc))
SharedPtr< XmlNode > CloneNode(bool deep) override
Creates a duplicate of this node.
void WriteContentTo(const SharedPtr< XmlWriter > &w) override
Saves all the children of the node to the specified XmlWriter. XmlText nodes do not have children,...
XmlText(const String &strData, const SharedPtr< XmlDocument > &doc)
Initializes a new instance of the XmlText class.
virtual SharedPtr< XmlText > SplitText(int32_t offset)
Splits the node into two nodes at the specified offset, keeping both in the tree as siblings.
String get_Name() override
Returns the qualified name of the node.
void set_Value(String value) override
Sets the value of the node.
SharedPtr< XmlNode > get_PreviousText() override
Returns the text node that immediately precedes this node.
XPathNodeType
Defines the XPath node types that can be returned from the XPathNavigator class.
Definition: xpath_node_type.h:17
@ Xml
Serialize according to the XML 1.0 rules.
XmlNodeType
Specifies the type of node.
Definition: xml_node_type.h:15
Definition: db_command.h:9