CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
xml_declaration.h
1
2
3#pragma once
4
5#include <xml/xml_node_type.h>
6#include <xml/xml_linked_node.h>
7#include <system/string.h>
8
9
11namespace System
12{
13namespace Xml
14{
15class XmlDocument;
16class XmlNode;
17class XmlNodeReaderNavigator;
18class XmlWriter;
19} // namespace Xml
20} // namespace System
22
23namespace System {
24
25namespace Xml {
26
31class ASPOSECPP_SHARED_CLASS XmlDeclaration : public XmlLinkedNode
32{
34 typedef XmlLinkedNode BaseType;
35
36 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
37 ASPOSECPP_SHARED_RTTI_INFO_DECL();
38
39public:
40
43
44private:
46 friend class XmlDocument;
47 friend class XmlNodeReaderNavigator;
49
50public:
51
54 ASPOSECPP_SHARED_API String get_Version();
72 ASPOSECPP_SHARED_API String get_Encoding();
75 ASPOSECPP_SHARED_API void set_Encoding(const String& value);
80 ASPOSECPP_SHARED_API String get_Standalone();
83 ASPOSECPP_SHARED_API void set_Standalone(const String& value);
86 ASPOSECPP_SHARED_API String get_Value() override;
89 ASPOSECPP_SHARED_API void set_Value(String value) override;
92 ASPOSECPP_SHARED_API String get_InnerText() override;
95 ASPOSECPP_SHARED_API void set_InnerText(String value) override;
98 ASPOSECPP_SHARED_API String get_Name() override;
101 ASPOSECPP_SHARED_API String get_LocalName() override;
104 ASPOSECPP_SHARED_API XmlNodeType get_NodeType() override;
105
110 ASPOSECPP_SHARED_API SharedPtr<XmlNode> CloneNode(bool deep) override;
113 ASPOSECPP_SHARED_API void WriteTo(const SharedPtr<XmlWriter>& w) override;
117 ASPOSECPP_SHARED_API void WriteContentTo(const SharedPtr<XmlWriter>& w) override;
118
119protected:
120
122 ASPOSECPP_SHARED_API void set_Version(const String& value);
124
130 ASPOSECPP_SHARED_API XmlDeclaration(const String& version, const String& encoding, const String& standalone, const SharedPtr<XmlDocument>& doc);
131
132 ASPOSECPP_SHARED_API MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(XmlDeclaration, CODEPORTING_ARGS(String version, String encoding, String standalone, SharedPtr<XmlDocument> doc));
133
134 virtual ASPOSECPP_SHARED_API ~XmlDeclaration();
135
136private:
137
138 static const String YES;
139 static const String NO;
140 String _version;
141 String _encoding;
142 String _standalone;
143
144 bool IsValidXmlVersion(const String& ver);
145
146};
147
148} // namespace Xml
149} // namespace System
150
151
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 the XML declaration node <?xml version='1.0'...?>.
Definition: xml_declaration.h:32
String get_Name() override
Returns the qualified name of the node.
XmlDeclaration(const String &version, const String &encoding, const String &standalone, const SharedPtr< XmlDocument > &doc)
Initializes a new instance of the XmlDeclaration class.
String get_Value() override
Returns the value of the XmlDeclaration.
void WriteContentTo(const SharedPtr< XmlWriter > &w) override
Saves the children of the node to the specified XmlWriter. Because XmlDeclaration nodes do not have c...
MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(XmlDeclaration, CODEPORTING_ARGS(String version, String encoding, String standalone, SharedPtr< XmlDocument > doc))
void set_Encoding(const String &value)
Sets the encoding level of the XML document.
void WriteTo(const SharedPtr< XmlWriter > &w) override
Saves the node to the specified XmlWriter.
String get_InnerText() override
Returns the concatenated values of the XmlDeclaration.
void set_Value(String value) override
Sets the value of the XmlDeclaration.
String get_LocalName() override
Returns the local name of the node.
void set_InnerText(String value) override
Sets the concatenated values of the XmlDeclaration.
String get_Encoding()
Returns the encoding level of the XML document.
XmlNodeType get_NodeType() override
Returns the type of the current node.
String get_Version()
Returns the XML version of the document.
SharedPtr< XmlNode > CloneNode(bool deep) override
Creates a duplicate of this node.
String get_Standalone()
Returns the value of the standalone attribute.
void set_Standalone(const String &value)
Sets the value of the standalone attribute.
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
@ 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