CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
xml_schema_attribute.h
1
2
3#pragma once
4
5#include <xml/schema/xml_schema_use.h>
6#include <xml/schema/xml_schema_form.h>
7#include <xml/schema/xml_schema_annotated.h>
8#include <xml/schema/validation_event_handler.h>
9#include <system/string.h>
10
11
13namespace System
14{
15namespace Xml
16{
17class DocumentSchemaValidator;
18namespace Schema
19{
20class Compiler;
21class Preprocessor;
22class SchemaAttDef;
23class SchemaCollectionCompiler;
24class SchemaCollectionPreprocessor;
25class SchemaInfo;
26class XmlSchemaComplexType;
27class XmlSchemaDatatype;
28class XmlSchemaObject;
29class XmlSchemaSet;
30class XmlSchemaSimpleType;
31class XmlSchemaValidator;
32} // namespace Schema
33class XmlQualifiedName;
34class XmlReader;
35class XmlResolver;
36namespace XPath
37{
38class XPathNavigator;
39} // namespace XPath
40} // namespace Xml
41} // namespace System
43
44namespace System {
45
46namespace Xml {
47
48namespace Schema {
49
57class ASPOSECPP_SHARED_CLASS XmlSchemaAttribute : public XmlSchemaAnnotated
58{
61
62 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
63 ASPOSECPP_SHARED_RTTI_INFO_DECL();
64
65public:
66
69
70private:
72 friend class XPath::XPathNavigator;
73 friend class System::Xml::DocumentSchemaValidator;
74 friend class Preprocessor;
75 friend class SchemaCollectionCompiler;
76 friend class SchemaCollectionPreprocessor;
77 friend class SchemaInfo;
78 friend class Compiler;
79 friend class XmlSchemaComplexType;
80 friend class XmlSchemaValidator;
82
83public:
84
87 ASPOSECPP_SHARED_API String get_DefaultValue();
90 ASPOSECPP_SHARED_API void set_DefaultValue(const String& value);
93 ASPOSECPP_SHARED_API String get_FixedValue();
96 ASPOSECPP_SHARED_API void set_FixedValue(const String& value);
101 ASPOSECPP_SHARED_API XmlSchemaForm get_Form();
104 ASPOSECPP_SHARED_API void set_Form(XmlSchemaForm value);
107 ASPOSECPP_SHARED_API String get_Name();
110 ASPOSECPP_SHARED_API void set_Name(const String& value);
116 ASPOSECPP_SHARED_API void set_RefName(const SharedPtr<XmlQualifiedName>& value);
122 ASPOSECPP_SHARED_API void set_SchemaTypeName(const SharedPtr<XmlQualifiedName>& value);
128 ASPOSECPP_SHARED_API void set_SchemaType(const SharedPtr<XmlSchemaSimpleType>& value);
131 ASPOSECPP_SHARED_API XmlSchemaUse get_Use();
134 ASPOSECPP_SHARED_API void set_Use(XmlSchemaUse value);
143 ASPOSECPP_SHARED_API SharedPtr<Object> get_AttributeType();
148
150 ASPOSECPP_SHARED_API XmlSchemaAttribute();
151
152protected:
153
155 SharedPtr<XmlSchemaDatatype> get_Datatype();
156 SharedPtr<SchemaAttDef> get_AttDef();
157 void set_AttDef(const SharedPtr<SchemaAttDef>& value);
158 bool get_HasDefault();
159 ASPOSECPP_SHARED_API String get_NameAttribute() override;
160 ASPOSECPP_SHARED_API void set_NameAttribute(String value) override;
161
162 SharedPtr<XmlReader> Validate(const SharedPtr<XmlReader>& reader, const SharedPtr<XmlResolver>& resolver, const SharedPtr<XmlSchemaSet>& schemaSet, ValidationEventHandler valEventHandler);
163 void SetQualifiedName(const SharedPtr<XmlQualifiedName>& value);
164 void SetAttributeType(const SharedPtr<XmlSchemaSimpleType>& value);
165 ASPOSECPP_SHARED_API SharedPtr<XmlSchemaObject> Clone() override;
167
168 virtual ASPOSECPP_SHARED_API ~XmlSchemaAttribute();
169
171 #ifdef ASPOSE_GET_SHARED_MEMBERS
172 ASPOSECPP_SHARED_API void GetSharedMembers(System::Object::shared_members_type& result) const override;
173 #endif
175
176private:
177
178 String _defaultValue;
179 String _fixedValue;
180 String _name;
181 XmlSchemaForm _form;
182 XmlSchemaUse _use;
185 SharedPtr<XmlQualifiedName> _qualifiedName;
187 SharedPtr<XmlSchemaSimpleType> _attributeType;
189
190 ThisType* CppMemberwiseClone() const override { return new ThisType(*this); }
191
192};
193
194} // namespace Schema
195} // namespace Xml
196} // namespace System
197
198
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
The base class for any element that can contain annotation elements.
Definition: xml_schema_annotated.h:35
Represents the attribute element from the XML Schema as specified by the World Wide Web Consortium (W...
Definition: xml_schema_attribute.h:58
void set_RefName(const SharedPtr< XmlQualifiedName > &value)
Sets the name of an attribute declared in this schema (or another schema indicated by the specified n...
SharedPtr< XmlQualifiedName > get_SchemaTypeName()
Returns the name of the simple type defined in this schema (or another schema indicated by the specif...
String get_FixedValue()
Returns the fixed value for the attribute.
void set_Use(XmlSchemaUse value)
Sets information about how the attribute is used.
void set_Name(const String &value)
Sets the name of the attribute.
void set_FixedValue(const String &value)
Sets the fixed value for the attribute.
String get_DefaultValue()
Returns the default value for the attribute.
SharedPtr< XmlQualifiedName > get_QualifiedName()
Returns the qualified name for the attribute.
void set_DefaultValue(const String &value)
Sets the default value for the attribute.
XmlSchemaForm get_Form()
Returns the form for the attribute.
SharedPtr< Object > get_AttributeType()
Returns the object based on the XmlSchemaAttribute::get_SchemaType or XmlSchemaAttribute::get_SchemaT...
String get_Name()
Returns the name of the attribute.
XmlSchemaUse get_Use()
Returns information about how the attribute is used.
SharedPtr< XmlSchemaSimpleType > get_SchemaType()
Returns the attribute type to a simple type.
void set_SchemaType(const SharedPtr< XmlSchemaSimpleType > &value)
Sets the attribute type to a simple type.
void set_Form(XmlSchemaForm value)
Sets the form for the attribute.
SharedPtr< XmlQualifiedName > get_RefName()
Returns the name of an attribute declared in this schema (or another schema indicated by the specifie...
SharedPtr< XmlSchemaSimpleType > get_AttributeSchemaType()
Returns an XmlSchemaSimpleType object representing the type of the attribute based on the XmlSchemaAt...
void set_SchemaTypeName(const SharedPtr< XmlQualifiedName > &value)
Sets the name of the simple type defined in this schema (or another schema indicated by the specified...
XmlSchemaAttribute()
Initializes a new instance of the XmlSchemaAttribute class.
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 root class for the Xml schema object model hierarchy and serves as a base class for cl...
Definition: xml_schema_object.h:47
Represents an XML Schema Definition Language (XSD) Schema validation engine. The XmlSchemaValidator c...
Definition: xml_schema_validator.h:93
Provides a cursor model for navigating and editing XML data.
Definition: xpath_navigator.h:89
XmlSchemaUse
Indicator of how the attribute is used.
Definition: xml_schema_use.h:17
System::MulticastDelegate< void(SharedPtr< Object >, SharedPtr< ValidationEventArgs >)> ValidationEventHandler
Represents the callback method that will handle XML schema validation events and the ValidationEventA...
Definition: validation_event_handler.h:33
XmlSchemaForm
Indicates if attributes or elements need to be qualified with a namespace prefix.
Definition: xml_schema_form.h:17
@ Schema
Validate according to XML Schema definition language (XSD) schemas, including inline XML Schemas....
@ Xml
Serialize according to the XML 1.0 rules.
Definition: db_command.h:9