CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
xpath_document.h
1
2
3#pragma once
4
5#include <xml/xpath/ixpath_navigable.h>
6#include <xml/xml_space.h>
7#include <system/shared_ptr.h>
8#include <system/enum_helpers.h>
9
10
12namespace System
13{
14namespace Internal
15{
16namespace Xml
17{
18namespace Cache
19{
20class XPathDocumentBuilder;
21class XPathDocumentNavigator;
22class XPathNode;
23class XPathNodeHelper;
24} // namespace Cache
25} // namespace Xml
26} // namespace Internal
27namespace IO
28{
29class Stream;
30class TextReader;
31} // namespace IO
32class String;
33namespace Xml
34{
35class XmlNameTable;
36class XmlRawWriter;
37class XmlReader;
38class XmlTextReaderImpl;
39namespace XPath
40{
41class XPathDocumentImpl;
42class XPathNavigator;
43} // namespace XPath
44namespace Xsl
45{
46namespace XsltOld
47{
48class NavigatorOutput;
49} // namespace XsltOld
50} // namespace Xsl
51} // namespace Xml
52} // namespace System
54
55namespace System {
56
57namespace Xml {
58
59namespace XPath {
60
65class ASPOSECPP_SHARED_CLASS XPathDocument : public IXPathNavigable
66{
67 typedef XPathDocument ThisType;
69
70 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
71 ASPOSECPP_SHARED_RTTI_INFO_DECL();
72
73public:
74
77
78private:
80 friend class Internal::Xml::Cache::XPathDocumentBuilder;
81 friend class Internal::Xml::Cache::XPathDocumentNavigator;
82 friend class Internal::Xml::Cache::XPathNode;
83 friend class Internal::Xml::Cache::XPathNodeHelper;
84 friend class XPathDocumentImpl;
85 friend class Xsl::XsltOld::NavigatorOutput;
87
88protected:
89
91 enum class LoadFlags
92 {
93 None = 0,
94 AtomizeNames = 1,
95 Fragment = 2
96 };
97
98 DECLARE_FRIEND_ENUM_OPERATORS(System::Xml::XPath::XPathDocument::LoadFlags);
100
101public:
102
109 ASPOSECPP_SHARED_API XPathDocument(const SharedPtr<XmlReader>& reader);
117 ASPOSECPP_SHARED_API XPathDocument(const SharedPtr<XmlReader>& reader, XmlSpace space);
124 ASPOSECPP_SHARED_API XPathDocument(const SharedPtr<IO::TextReader>& textReader);
130 ASPOSECPP_SHARED_API XPathDocument(const SharedPtr<IO::Stream>& stream);
136 ASPOSECPP_SHARED_API XPathDocument(const String& uri);
144 ASPOSECPP_SHARED_API XPathDocument(const String& uri, XmlSpace space);
145
148 ASPOSECPP_SHARED_API SharedPtr<XPathNavigator> CreateNavigator() override;
149
150protected:
151
154 SharedPtr<XmlNameTable> get_NameTable();
155 bool get_HasLineInfo();
156
158 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(XPathDocument, CODEPORTING_ARGS());
159
160 XPathDocument(const SharedPtr<XmlNameTable>& nameTable);
161 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION(XPathDocument, CODEPORTING_ARGS(SharedPtr<XmlNameTable> nameTable));
162
163 SharedPtr<XmlRawWriter> LoadFromWriter(XPathDocument::LoadFlags flags, const String& baseUri);
164 void LoadFromReader(const SharedPtr<XmlReader>& reader, XmlSpace space);
166
167 virtual ASPOSECPP_SHARED_API ~XPathDocument();
168
170 #ifdef ASPOSE_GET_SHARED_MEMBERS
171 ASPOSECPP_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
172 #endif
174
175private:
176
178
180
181};
182
184DECLARE_ENUM_OPERATORS(System::Xml::XPath::XPathDocument::LoadFlags);
185DECLARE_USING_GLOBAL_OPERATORS
187
188} // namespace XPath
189} // namespace Xml
190} // namespace System
191
193DECLARE_USING_ENUM_OPERATORS(System::Xml::XPath);
195
196
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
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 an accessor to the XPathNavigator class.
Definition: ixpath_navigable.h:29
Provides a fast, read-only, in-memory representation of an XML document by using the XPath data model...
Definition: xpath_document.h:66
XPathDocument(const SharedPtr< IO::TextReader > &textReader)
Initializes a new instance of the XPathDocument class from the XML data that is contained in the spec...
XPathDocument(const String &uri)
Initializes a new instance of the XPathDocument class from the XML data in the specified file.
SharedPtr< XPathNavigator > CreateNavigator() override
Initializes a read-only XPathNavigator object for navigating through nodes in this XPathDocument.
XPathDocument(const SharedPtr< IO::Stream > &stream)
Initializes a new instance of the XPathDocument class from the XML data in the specified Stream objec...
XPathDocument(const String &uri, XmlSpace space)
Initializes a new instance of the XPathDocument class from the XML data in the file specified with th...
XPathDocument(const SharedPtr< XmlReader > &reader, XmlSpace space)
Initializes a new instance of the XPathDocument class from the XML data that is contained in the spec...
XPathDocument(const SharedPtr< XmlReader > &reader)
Initializes a new instance of the XPathDocument class from the XML data that is contained in the spec...
@ Stream
The type that supports reliable, two-way, connection-based byte streams without duplication of data a...
Definition: ixpath_navigable.h:25
XmlSpace
Specifies the current xml:space scope.
Definition: xml_space.h:15
@ Xml
Serialize according to the XML 1.0 rules.
Definition: db_command.h:9
@ Fragment
The Fragment data.