CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
xslt_context.h
1
2
3#pragma once
4
5#include <xml/xpath/xpath_expression.h>
6#include <xml/xml_namespace_manager.h>
7#include <system/array.h>
8#include <cstdint>
9
10
12namespace System
13{
14namespace Internal
15{
16namespace Xml
17{
18namespace XPath
19{
20class CompiledXpathExpr;
21} // namespace XPath
22} // namespace Xml
23} // namespace Internal
24namespace Xml
25{
26class NameTable;
27namespace XPath
28{
29class XPathNavigator;
30} // namespace XPath
31namespace Xsl
32{
33class XsltContext;
34namespace XsltOld
35{
36class XsltCompileContext;
37} // namespace XsltOld
38} // namespace Xsl
39} // namespace Xml
40} // namespace System
42
43namespace System {
44
45namespace Xml {
46
47namespace Xsl {
48
51class ASPOSECPP_SHARED_CLASS IXsltContextFunction : public System::Object
52{
55
56 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
57 ASPOSECPP_SHARED_RTTI_INFO_DECL();
58
59public:
60
64 virtual int32_t get_Minargs() = 0;
68 virtual int32_t get_Maxargs() = 0;
77
84
85};
86
88class ASPOSECPP_SHARED_CLASS IXsltContextVariable : public virtual System::Object
89{
92
93 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
94 ASPOSECPP_SHARED_RTTI_INFO_DECL();
95
96public:
97
100 virtual bool get_IsLocal() = 0;
104 virtual bool get_IsParam() = 0;
108
114
115};
116
120class ASPOSECPP_SHARED_CLASS XsltContext : public XmlNamespaceManager
121{
122 typedef XsltContext ThisType;
124
125 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
126 ASPOSECPP_SHARED_RTTI_INFO_DECL();
127
128public:
129
132
133private:
135 friend class Internal::Xml::XPath::CompiledXpathExpr;
136 friend class XsltOld::XsltCompileContext;
138
139public:
140
144 virtual ASPOSECPP_SHARED_API bool get_Whitespace() = 0;
145
150 virtual ASPOSECPP_SHARED_API SharedPtr<IXsltContextVariable> ResolveVariable(String prefix, String name) = 0;
162 virtual ASPOSECPP_SHARED_API bool PreserveWhitespace(SharedPtr<System::Xml::XPath::XPathNavigator> node) = 0;
171 virtual ASPOSECPP_SHARED_API int32_t CompareDocument(String baseUri, String nextbaseUri) = 0;
172
173protected:
174
177 ASPOSECPP_SHARED_API XsltContext(const SharedPtr<System::Xml::NameTable>& table);
179 ASPOSECPP_SHARED_API XsltContext();
180
182 XsltContext(bool dummy);
184
185 virtual ASPOSECPP_SHARED_API ~XsltContext();
186
187};
188
189} // namespace Xsl
190} // namespace Xml
191} // namespace System
192
193
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 read-only access to a set of prefix and namespace mappings.
Definition: ixml_namespace_resolver.h:29
Resolves, adds, and removes namespaces to a collection and provides scope management for these namesp...
Definition: xml_namespace_manager.h:44
Provides an interface to a given function defined in the Extensible Stylesheet Language for Transform...
Definition: xslt_context.h:52
virtual SharedPtr< Object > Invoke(SharedPtr< XsltContext > xsltContext, ArrayPtr< SharedPtr< Object > > args, SharedPtr< System::Xml::XPath::XPathNavigator > docContext)=0
Provides the method to invoke the function with the given arguments in the given context.
virtual System::Xml::XPath::XPathResultType get_ReturnType()=0
Returns the XPathResultType representing the XPath type returned by the function.
virtual int32_t get_Minargs()=0
Returns the minimum number of arguments for the function. This enables the user to differentiate betw...
virtual ArrayPtr< System::Xml::XPath::XPathResultType > get_ArgTypes()=0
Returns the supplied XML Path Language (XPath) types for the function's argument list....
virtual int32_t get_Maxargs()=0
Returns the maximum number of arguments for the function. This enables the user to differentiate betw...
Provides an interface to a given variable that is defined in the style sheet during runtime execution...
Definition: xslt_context.h:89
virtual bool get_IsParam()=0
Returns a value indicating whether the variable is an Extensible Stylesheet Language Transformations ...
virtual SharedPtr< Object > Evaluate(SharedPtr< XsltContext > xsltContext)=0
Evaluates the variable at runtime and returns an object that represents the value of the variable.
virtual bool get_IsLocal()=0
Returns a value indicating whether the variable is local.
virtual System::Xml::XPath::XPathResultType get_VariableType()=0
Returns the XPathResultType representing the XML Path Language (XPath) type of the variable.
Encapsulates the current execution context of the Extensible Stylesheet Language for Transformations ...
Definition: xslt_context.h:121
virtual SharedPtr< IXsltContextFunction > ResolveFunction(String prefix, String name, ArrayPtr< System::Xml::XPath::XPathResultType > ArgTypes)=0
When overridden in a derived class, resolves a function reference and returns an IXsltContextFunction...
XsltContext()
Initializes a new instance of the XsltContext class.
XsltContext(const SharedPtr< System::Xml::NameTable > &table)
Initializes a new instance of the XsltContext class with the specified NameTable.
virtual SharedPtr< IXsltContextVariable > ResolveVariable(String prefix, String name)=0
When overridden in a derived class, resolves a variable reference and returns an IXsltContextVariable...
virtual int32_t CompareDocument(String baseUri, String nextbaseUri)=0
When overridden in a derived class, compares the base Uniform Resource Identifiers (URIs) of two docu...
virtual bool PreserveWhitespace(SharedPtr< System::Xml::XPath::XPathNavigator > node)=0
When overridden in a derived class, evaluates whether to preserve white space nodes or strip them for...
virtual bool get_Whitespace()=0
When overridden in a derived class, gets a value indicating whether to include white space nodes in t...
XPathResultType
Specifies the return type of the XPath expression.
Definition: xpath_expression.h:67
@ Xml
Serialize according to the XML 1.0 rules.
Definition: db_command.h:9