CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
xml_character_data.h
1
2
3#pragma once
4
5#include <xml/xml_linked_node.h>
6#include <system/string.h>
7#include <cstdint>
8
9
11namespace System
12{
13namespace Xml
14{
15class XmlCDataSection;
16class XmlComment;
17class XmlDocument;
18class XmlNode;
19class XmlSignificantWhitespace;
20class XmlText;
21class XmlWhitespace;
22namespace XPath
23{
24enum class XPathNodeType;
25} // namespace XPath
26} // namespace Xml
27} // namespace System
29
30namespace System {
31
32namespace Xml {
33
35class ASPOSECPP_SHARED_CLASS XmlCharacterData : public XmlLinkedNode
36{
38 typedef XmlLinkedNode BaseType;
39
40 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
41 ASPOSECPP_SHARED_RTTI_INFO_DECL();
42
43public:
44
47
48private:
50 friend class XmlCDataSection;
51 friend class XmlComment;
52 friend class XmlSignificantWhitespace;
53 friend class XmlText;
54 friend class XmlWhitespace;
56
57public:
58
61 ASPOSECPP_SHARED_API String get_Value() override;
65 ASPOSECPP_SHARED_API void set_Value(String value) override;
68 ASPOSECPP_SHARED_API String get_InnerText() override;
71 ASPOSECPP_SHARED_API void set_InnerText(String value) override;
74 virtual ASPOSECPP_SHARED_API String get_Data();
77 virtual ASPOSECPP_SHARED_API void set_Data(String value);
81 virtual ASPOSECPP_SHARED_API int32_t get_Length();
82
88 virtual ASPOSECPP_SHARED_API String Substring(int32_t offset, int32_t count);
91 virtual ASPOSECPP_SHARED_API void AppendData(String strData);
95 virtual ASPOSECPP_SHARED_API void InsertData(int32_t offset, String strData);
99 virtual ASPOSECPP_SHARED_API void DeleteData(int32_t offset, int32_t count);
104 virtual ASPOSECPP_SHARED_API void ReplaceData(int32_t offset, int32_t count, String strData);
105
106protected:
107
111 ASPOSECPP_SHARED_API XmlCharacterData(const String& data, const SharedPtr<XmlDocument>& doc);
112
114 bool CheckOnData(const String& data);
115 bool DecideXPNodeTypeForTextNodes(SharedPtr<XmlNode> node, XPath::XPathNodeType& xnt);
117
118 virtual ASPOSECPP_SHARED_API ~XmlCharacterData();
119
120private:
121
122 String _data;
123
124};
125
126} // namespace Xml
127} // namespace System
128
129
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
Represents a CDATA section.
Definition: xml_cdata_section.h:36
Provides text manipulation methods that are used by several classes.
Definition: xml_character_data.h:36
String get_InnerText() override
Returns the concatenated values of the node and all the children of the node.
virtual void DeleteData(int32_t offset, int32_t count)
Removes a range of characters from the node.
void set_Value(String value) override
Sets the value of the node.
XmlCharacterData(const String &data, const SharedPtr< XmlDocument > &doc)
Initializes a new instance of the XmlCharacterData class.
virtual void AppendData(String strData)
Appends the specified string to the end of the character data of the node.
virtual String get_Data()
Returns the data of the node.
virtual void set_Data(String value)
Sets the data of the node.
virtual String Substring(int32_t offset, int32_t count)
Retrieves a substring of the full string from the specified range.
void set_InnerText(String value) override
Sets the concatenated values of the node and all the children of the node.
String get_Value() override
Returns the value of the node.
virtual void ReplaceData(int32_t offset, int32_t count, String strData)
Replaces the specified number of characters starting at the specified offset with the specified strin...
virtual int32_t get_Length()
Returns the length of the data, in characters.
virtual void InsertData(int32_t offset, String strData)
Inserts the specified string at the specified character offset.
Represents the content of an XML comment.
Definition: xml_comment.h:36
Returns the node immediately preceding or following this node.
Definition: xml_linked_node.h:32
Represents white space between markup in a mixed content node or white space within an xml:space='pre...
Definition: xml_significant_whitespace.h:37
Represents the text content of an element or attribute.
Definition: xml_text.h:37
Represents white space in element content.
Definition: xml_whitespace.h:36
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.
Definition: db_command.h:9