CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
xml_qualified_name.h
1
2
3#pragma once
4
5#include <system/string.h>
6#include <cstdint>
7
8
10namespace System
11{
12namespace Xml
13{
14class IXmlNamespaceResolver;
15class QueryOutputWriter;
16class QueryOutputWriterV1;
17namespace Schema
18{
19class Datatype_NOTATION;
20class Datatype_QName;
21class Datatype_QNameXdr;
22class DtdValidator;
23class Preprocessor;
24class SchemaCollectionPreprocessor;
25class XdrBuilder;
26class XdrValidator;
27class XmlSchemaAttribute;
28class XmlSchemaComplexType;
29class XmlSchemaElement;
30class XmlSchemaSimpleTypeList;
31class XmlSchemaSimpleTypeRestriction;
32class XmlSchemaSimpleTypeUnion;
33class XmlSchemaValidator;
34class XsdBuilder;
35class XsdValidator;
36} // namespace Schema
37class XmlNameTable;
38namespace Xsl
39{
40class XsltArgumentList;
41} // namespace Xsl
42} // namespace Xml
43} // namespace System
45
46namespace System {
47
48namespace Xml {
49
54class ASPOSECPP_SHARED_CLASS XmlQualifiedName : public System::Object
55{
58
59 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
60 ASPOSECPP_SHARED_RTTI_INFO_DECL();
61
62public:
63
66
67private:
69 friend class QueryOutputWriter;
70 friend class QueryOutputWriterV1;
71 friend class Schema::Datatype_QName;
72 friend class Schema::Datatype_NOTATION;
73 friend class Schema::Datatype_QNameXdr;
74 friend class Schema::DtdValidator;
75 friend class Schema::Preprocessor;
76 friend class Schema::SchemaCollectionPreprocessor;
77 friend class Schema::XdrBuilder;
78 friend class Schema::XdrValidator;
79 friend class Schema::XmlSchemaAttribute;
81 friend class Schema::XmlSchemaElement;
85 friend class Schema::XmlSchemaValidator;
86 friend class Schema::XsdBuilder;
87 friend class Schema::XsdValidator;
88 friend class Xsl::XsltArgumentList;
89 friend ASPOSECPP_SHARED_API bool operator ==(const SharedPtr<XmlQualifiedName>& a, const SharedPtr<XmlQualifiedName>& b);
90 friend ASPOSECPP_SHARED_API bool operator !=(const SharedPtr<XmlQualifiedName>& a, const SharedPtr<XmlQualifiedName>& b);
92
93public:
94
96 static ASPOSECPP_SHARED_API SharedPtr<XmlQualifiedName> Empty;
97
100 ASPOSECPP_SHARED_API String get_Namespace() const;
103 ASPOSECPP_SHARED_API String get_Name() const;
106 ASPOSECPP_SHARED_API bool get_IsEmpty() const;
107
109 ASPOSECPP_SHARED_API XmlQualifiedName();
112 ASPOSECPP_SHARED_API XmlQualifiedName(const String& name);
116 ASPOSECPP_SHARED_API XmlQualifiedName(const String& name, const String& ns);
117
120 ASPOSECPP_SHARED_API int32_t GetHashCode() const override;
124 ASPOSECPP_SHARED_API bool Equals(SharedPtr<Object> other) override;
130 static ASPOSECPP_SHARED_API String ToString(const String& name, const String& ns);
134 ASPOSECPP_SHARED_API String ToString() const override;
135
136protected:
137
139 void Init(const String& name, const String& ns);
140 void SetNamespace(const String& ns);
141 void Verify();
142 void Atomize(const SharedPtr<XmlNameTable>& nameTable);
145 #ifdef ASPOSE_GET_SHARED_MEMBERS
146 ASPOSECPP_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
147 #endif
149
150private:
151
152 String _name;
153 String _ns;
154 mutable int32_t _hash;
155
156 String ToString_NonConst();
157 virtual ThisType* CppMemberwiseClone() const { return new ThisType(*this); }
158
159};
160
165ASPOSECPP_SHARED_API bool operator ==(const SharedPtr<XmlQualifiedName>& a, const SharedPtr<XmlQualifiedName>& b);
170ASPOSECPP_SHARED_API bool operator !=(const SharedPtr<XmlQualifiedName>& a, const SharedPtr<XmlQualifiedName>& b);
171
172} // namespace Xml
173} // namespace System
174
175
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
Represents the attribute element from the XML Schema as specified by the World Wide Web Consortium (W...
Definition: xml_schema_attribute.h:58
Represents the complexType element from XML Schema as specified by the World Wide Web Consortium (W3C...
Definition: xml_schema_complex_type.h:64
Represents the element element from XML Schema as specified by the World Wide Web Consortium (W3C)....
Definition: xml_schema_element.h:60
Represents the list element from XML Schema as specified by the World Wide Web Consortium (W3C)....
Definition: xml_schema_simple_type_list.h:36
Represents the restriction element for simple types from XML Schema as specified by the World Wide We...
Definition: xml_schema_simple_type_restriction.h:37
Represents the union element for simple types from XML Schema as specified by the World Wide Web Cons...
Definition: xml_schema_simple_type_union.h:41
Represents an XML Schema Definition Language (XSD) Schema validation engine. The XmlSchemaValidator c...
Definition: xml_schema_validator.h:93
Represents an XML qualified name.
Definition: xml_qualified_name.h:55
XmlQualifiedName(const String &name, const String &ns)
Initializes a new instance of the XmlQualifiedName class with the specified name and namespace.
String ToString() const override
Returns the string value of the XmlQualifiedName.
static SharedPtr< XmlQualifiedName > Empty
Provides an empty XmlQualifiedName.
Definition: xml_qualified_name.h:96
String get_Name() const
Returns a string representation of the qualified name of the XmlQualifiedName.
XmlQualifiedName(const String &name)
Initializes a new instance of the XmlQualifiedName class with the specified name.
bool Equals(SharedPtr< Object > other) override
Determines whether the specified XmlQualifiedName object is equal to the current XmlQualifiedName obj...
XmlQualifiedName()
Initializes a new instance of the XmlQualifiedName class.
int32_t GetHashCode() const override
Returns the hash code for the XmlQualifiedName.
static String ToString(const String &name, const String &ns)
Returns the string value of the XmlQualifiedName.
String get_Namespace() const
Returns a string representation of the namespace of the XmlQualifiedName.
bool get_IsEmpty() const
Returns a value indicating whether the XmlQualifiedName is empty.
Contains a variable number of arguments which are either XSLT parameters or extension objects.
Definition: xslt_argument_list.h:65
bool operator!=(const SharedPtr< XmlQualifiedName > &a, const SharedPtr< XmlQualifiedName > &b)
Compares two XmlQualifiedName objects.
@ Schema
Validate according to XML Schema definition language (XSD) schemas, including inline XML Schemas....
@ Xml
Serialize according to the XML 1.0 rules.
@ Parse
Used for parsing DTDs.
bool operator==(const SharedPtr< XmlQualifiedName > &a, const SharedPtr< XmlQualifiedName > &b)
Compares two XmlQualifiedName objects.
Definition: db_command.h:9