CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
System::Xml::Schema::XmlSchemaSet Class Reference

Contains a cache of XML Schema definition language (XSD) schemas. More...

#include <xml_schema_set.h>

Inherits System::Object.

Public Types

using Ptr = SharedPtr< XmlSchemaSet >
 An alias for shared pointer to an instance of this class. More...
 
- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 

Public Member Functions

SharedPtr< XmlNameTableget_NameTable ()
 Returns the default XmlNameTable used by the XmlSchemaSet when loading new XML Schema definition language (XSD) schemas. More...
 
bool get_IsCompiled ()
 Returns a value that indicates whether the XML Schema definition language (XSD) schemas in the XmlSchemaSet have been compiled. More...
 
void set_XmlResolver (const SharedPtr< System::Xml::XmlResolver > &value)
 Sets the XmlResolver used to resolve namespaces or locations referenced in include and import elements of a schema. More...
 
SharedPtr< XmlSchemaCompilationSettingsget_CompilationSettings ()
 Returns the XmlSchemaCompilationSettings for the XmlSchemaSet. More...
 
void set_CompilationSettings (const SharedPtr< XmlSchemaCompilationSettings > &value)
 Sets the XmlSchemaCompilationSettings for the XmlSchemaSet. More...
 
int32_t get_Count ()
 Returns the number of logical XML Schema definition language (XSD) schemas in the XmlSchemaSet. More...
 
SharedPtr< XmlSchemaObjectTableget_GlobalElements ()
 Returns all the global elements in all the XML Schema definition language (XSD) schemas in the XmlSchemaSet. More...
 
SharedPtr< XmlSchemaObjectTableget_GlobalAttributes ()
 Returns all the global attributes in all the XML Schema definition language (XSD) schemas in the XmlSchemaSet. More...
 
SharedPtr< XmlSchemaObjectTableget_GlobalTypes ()
 Returns all of the global simple and complex types in all the XML Schema definition language (XSD) schemas in the XmlSchemaSet. More...
 
 XmlSchemaSet ()
 Initializes a new instance of the XmlSchemaSet class. More...
 
 XmlSchemaSet (const SharedPtr< XmlNameTable > &nameTable)
 Initializes a new instance of the XmlSchemaSet class with the specified XmlNameTable. More...
 
template<class... Args>
void ValidationEventHandler_add (Args... value)
 Adds an event handler for receiving information about XML Schema definition language (XSD) schema validation errors. More...
 
template<class... Args>
void ValidationEventHandler_remove (Args... value)
 Removes an event handler for receiving information about XML Schema definition language (XSD) schema validation errors. More...
 
SharedPtr< XmlSchemaAdd (String targetNamespace, const String &schemaUri)
 Adds the XML Schema definition language (XSD) schema at the URL specified to the XmlSchemaSet. More...
 
SharedPtr< XmlSchemaAdd (String targetNamespace, const SharedPtr< XmlReader > &schemaDocument)
 Adds the XML Schema definition language (XSD) schema contained in the XmlReader to the XmlSchemaSet. More...
 
void Add (const SharedPtr< XmlSchemaSet > &schemas)
 Adds all the XML Schema definition language (XSD) schemas in the given XmlSchemaSet to the XmlSchemaSet. More...
 
SharedPtr< XmlSchemaAdd (const SharedPtr< XmlSchema > &schema)
 Adds the given XmlSchema to the XmlSchemaSet. More...
 
SharedPtr< XmlSchemaRemove (const SharedPtr< XmlSchema > &schema)
 Removes the specified XML Schema definition language (XSD) schema from the XmlSchemaSet. More...
 
bool RemoveRecursive (const SharedPtr< XmlSchema > &schemaToRemove)
 Removes the specified XML Schema definition language (XSD) schema and all the schemas it imports from the XmlSchemaSet. More...
 
bool Contains (String targetNamespace)
 Indicates whether an XML Schema definition language (XSD) schema with the specified target namespace URI is in the XmlSchemaSet. More...
 
bool Contains (const SharedPtr< XmlSchema > &schema)
 Indicates whether the specified XML Schema definition language (XSD) XmlSchema object is in the XmlSchemaSet. More...
 
void Compile ()
 Compiles the XML Schema definition language (XSD) schemas added to the XmlSchemaSet into one logical schema. More...
 
SharedPtr< XmlSchemaReprocess (SharedPtr< XmlSchema > schema)
 Reprocesses an XML Schema definition language (XSD) schema that already exists in the XmlSchemaSet. More...
 
void CopyTo (const ArrayPtr< SharedPtr< XmlSchema > > &schemas, int32_t index)
 Copies all the XmlSchema objects from the XmlSchemaSet to the given array, starting at the given index. More...
 
SharedPtr< Collections::Generic::IList< SharedPtr< XmlSchema > > > Schemas ()
 Returns a collection of all the XML Schema definition language (XSD) schemas in the XmlSchemaSet. More...
 
SharedPtr< Collections::Generic::List< SharedPtr< XmlSchema > > > Schemas (String targetNamespace)
 Returns a collection of all the XML Schema definition language (XSD) schemas in the XmlSchemaSet that belong to the given namespace. More...
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared reference counter. More...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int32_t GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () const
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual void SetTemplateWeakPtr (uint32_t argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
virtual bool FastCast (const Details::FastRttiBase &helper, void **out_ptr) const
 For internal purposes only. More...
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 Specialization of Object::ReferenceEquals for case of string and nullptr. More...
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 Specialization of Object::ReferenceEquals for case of strings. More...
 

Protected Member Functions

virtual ~XmlSchemaSet ()
 

Additional Inherited Members

- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Implements C# typeof(System.Object) construct. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 
template<>
bool Equals (double const &objA, double const &objB)
 Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. More...
 

Detailed Description

Contains a cache of XML Schema definition language (XSD) schemas.

Attention
Objects of this class should only be allocated using System::MakeObject() function. Never create instances of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

Member Typedef Documentation

◆ Ptr

An alias for shared pointer to an instance of this class.

Constructor & Destructor Documentation

◆ XmlSchemaSet() [1/2]

System::Xml::Schema::XmlSchemaSet::XmlSchemaSet ( )

Initializes a new instance of the XmlSchemaSet class.

◆ XmlSchemaSet() [2/2]

System::Xml::Schema::XmlSchemaSet::XmlSchemaSet ( const SharedPtr< XmlNameTable > &  nameTable)

Initializes a new instance of the XmlSchemaSet class with the specified XmlNameTable.

Parameters
nameTableThe XmlNameTable object to use.
Exceptions
ArgumentNullExceptionThe XmlNameTable object passed as a parameter is nullptr.

◆ ~XmlSchemaSet()

virtual System::Xml::Schema::XmlSchemaSet::~XmlSchemaSet ( )
protectedvirtual

Member Function Documentation

◆ Add() [1/4]

SharedPtr< XmlSchema > System::Xml::Schema::XmlSchemaSet::Add ( const SharedPtr< XmlSchema > &  schema)

Adds the given XmlSchema to the XmlSchemaSet.

Parameters
schemaThe XmlSchema object to add to the XmlSchemaSet.
Returns
An XmlSchema object if the schema is valid. If the schema is not valid and a ValidationEventHandler is specified, then nullptr is returned and the appropriate validation event is raised. Otherwise, an XmlSchemaException is thrown.
Exceptions
XmlSchemaExceptionThe schema is not valid.
ArgumentNullExceptionThe XmlSchema object passed as a parameter is nullptr.

◆ Add() [2/4]

void System::Xml::Schema::XmlSchemaSet::Add ( const SharedPtr< XmlSchemaSet > &  schemas)

Adds all the XML Schema definition language (XSD) schemas in the given XmlSchemaSet to the XmlSchemaSet.

Parameters
schemasThe XmlSchemaSet object.
Exceptions
XmlSchemaExceptionA schema in the XmlSchemaSet is not valid.
ArgumentNullExceptionThe XmlSchemaSet object passed as a parameter is nullptr.

◆ Add() [3/4]

SharedPtr< XmlSchema > System::Xml::Schema::XmlSchemaSet::Add ( String  targetNamespace,
const SharedPtr< XmlReader > &  schemaDocument 
)

Adds the XML Schema definition language (XSD) schema contained in the XmlReader to the XmlSchemaSet.

Parameters
targetNamespaceThe schema targetNamespace value, or nullptr to use the targetNamespace specified in the schema.
schemaDocumentThe XmlReader object.
Returns
An XmlSchema object if the schema is valid. If the schema is not valid and a ValidationEventHandler is specified, then nullptr is returned and the appropriate validation event is raised. Otherwise, an XmlSchemaException is thrown.
Exceptions
XmlSchemaExceptionThe schema is not valid.
ArgumentNullExceptionThe XmlReader object passed as a parameter is nullptr.

◆ Add() [4/4]

SharedPtr< XmlSchema > System::Xml::Schema::XmlSchemaSet::Add ( String  targetNamespace,
const String schemaUri 
)

Adds the XML Schema definition language (XSD) schema at the URL specified to the XmlSchemaSet.

Parameters
targetNamespaceThe schema targetNamespace value, or nullptr to use the targetNamespace specified in the schema.
schemaUriThe URL that specifies the schema to load.
Returns
An XmlSchema object if the schema is valid. If the schema is not valid and a ValidationEventHandler is specified, then nullptr is returned and the appropriate validation event is raised. Otherwise, an XmlSchemaException is thrown.
Exceptions
XmlSchemaExceptionThe schema is not valid.
ArgumentNullExceptionThe URL passed as a parameter is nullptr or String::Empty.

◆ Compile()

void System::Xml::Schema::XmlSchemaSet::Compile ( )

Compiles the XML Schema definition language (XSD) schemas added to the XmlSchemaSet into one logical schema.

Exceptions
XmlSchemaExceptionAn error occurred when validating and compiling the schemas in the XmlSchemaSet.

◆ Contains() [1/2]

bool System::Xml::Schema::XmlSchemaSet::Contains ( const SharedPtr< XmlSchema > &  schema)

Indicates whether the specified XML Schema definition language (XSD) XmlSchema object is in the XmlSchemaSet.

Parameters
schemaThe XmlSchema object.
Returns
true if the XmlSchema object is in the XmlSchemaSet; otherwise, false.
Exceptions
ArgumentNullExceptionThe XmlSchemaSet passed as a parameter is nullptr.

◆ Contains() [2/2]

bool System::Xml::Schema::XmlSchemaSet::Contains ( String  targetNamespace)

Indicates whether an XML Schema definition language (XSD) schema with the specified target namespace URI is in the XmlSchemaSet.

Parameters
targetNamespaceThe schema targetNamespace property.
Returns
true if a schema with the specified target namespace URI is in the XmlSchemaSet; otherwise, false.

◆ CopyTo()

void System::Xml::Schema::XmlSchemaSet::CopyTo ( const ArrayPtr< SharedPtr< XmlSchema > > &  schemas,
int32_t  index 
)

Copies all the XmlSchema objects from the XmlSchemaSet to the given array, starting at the given index.

Parameters
schemasThe array to copy the objects to.
indexThe index in the array where copying will begin.

◆ get_CompilationSettings()

SharedPtr< XmlSchemaCompilationSettings > System::Xml::Schema::XmlSchemaSet::get_CompilationSettings ( )

◆ get_Count()

int32_t System::Xml::Schema::XmlSchemaSet::get_Count ( )

Returns the number of logical XML Schema definition language (XSD) schemas in the XmlSchemaSet.

Returns
The number of logical schemas in the XmlSchemaSet.

◆ get_GlobalAttributes()

SharedPtr< XmlSchemaObjectTable > System::Xml::Schema::XmlSchemaSet::get_GlobalAttributes ( )

Returns all the global attributes in all the XML Schema definition language (XSD) schemas in the XmlSchemaSet.

Returns
The collection of global attributes.

◆ get_GlobalElements()

SharedPtr< XmlSchemaObjectTable > System::Xml::Schema::XmlSchemaSet::get_GlobalElements ( )

Returns all the global elements in all the XML Schema definition language (XSD) schemas in the XmlSchemaSet.

Returns
The collection of global elements.

◆ get_GlobalTypes()

SharedPtr< XmlSchemaObjectTable > System::Xml::Schema::XmlSchemaSet::get_GlobalTypes ( )

Returns all of the global simple and complex types in all the XML Schema definition language (XSD) schemas in the XmlSchemaSet.

Returns
The collection of global simple and complex types.

◆ get_IsCompiled()

bool System::Xml::Schema::XmlSchemaSet::get_IsCompiled ( )

Returns a value that indicates whether the XML Schema definition language (XSD) schemas in the XmlSchemaSet have been compiled.

Returns
true if the schemas in the XmlSchemaSet have been compiled since the last time a schema was added or removed from the XmlSchemaSet; otherwise, false.

◆ get_NameTable()

SharedPtr< XmlNameTable > System::Xml::Schema::XmlSchemaSet::get_NameTable ( )

Returns the default XmlNameTable used by the XmlSchemaSet when loading new XML Schema definition language (XSD) schemas.

Returns
A table of atomized string objects.

◆ Remove()

SharedPtr< XmlSchema > System::Xml::Schema::XmlSchemaSet::Remove ( const SharedPtr< XmlSchema > &  schema)

Removes the specified XML Schema definition language (XSD) schema from the XmlSchemaSet.

Parameters
schemaThe XmlSchema object to remove from the XmlSchemaSet.
Returns
The XmlSchema object removed from the XmlSchemaSet or nullptr if the schema was not found in the XmlSchemaSet.
Exceptions
XmlSchemaExceptionThe schema is not a valid schema.
ArgumentNullExceptionThe XmlSchema passed as a parameter is nullptr.

◆ RemoveRecursive()

bool System::Xml::Schema::XmlSchemaSet::RemoveRecursive ( const SharedPtr< XmlSchema > &  schemaToRemove)

Removes the specified XML Schema definition language (XSD) schema and all the schemas it imports from the XmlSchemaSet.

Parameters
schemaToRemoveThe XmlSchema object to remove from the XmlSchemaSet.
Returns
true if the XmlSchema object and all its imports were successfully removed; otherwise, false.
Exceptions
ArgumentNullExceptionThe XmlSchema passed as a parameter is nullptr.

◆ Reprocess()

SharedPtr< XmlSchema > System::Xml::Schema::XmlSchemaSet::Reprocess ( SharedPtr< XmlSchema schema)

Reprocesses an XML Schema definition language (XSD) schema that already exists in the XmlSchemaSet.

Parameters
schemaThe schema to reprocess.
Returns
An XmlSchema object if the schema is a valid schema. If the schema is not valid and a ValidationEventHandler is specified, nullptr is returned and the appropriate validation event is raised. Otherwise, an XmlSchemaException is thrown.
Exceptions
XmlSchemaExceptionThe schema is not valid.
ArgumentNullExceptionThe XmlSchema object passed as a parameter is nullptr.
ArgumentExceptionThe XmlSchema object passed as a parameter does not already exist in the XmlSchemaSet.

◆ Schemas() [1/2]

SharedPtr< Collections::Generic::IList< SharedPtr< XmlSchema > > > System::Xml::Schema::XmlSchemaSet::Schemas ( )

Returns a collection of all the XML Schema definition language (XSD) schemas in the XmlSchemaSet.

Returns
An IList object containing all the schemas that have been added to the XmlSchemaSet. If no schemas have been added to the XmlSchemaSet, an empty collection is returned.

◆ Schemas() [2/2]

SharedPtr< Collections::Generic::List< SharedPtr< XmlSchema > > > System::Xml::Schema::XmlSchemaSet::Schemas ( String  targetNamespace)

Returns a collection of all the XML Schema definition language (XSD) schemas in the XmlSchemaSet that belong to the given namespace.

Parameters
targetNamespaceThe schema targetNamespace property.
Returns
An IList object containing all the schemas that have been added to the XmlSchemaSet that belong to the given namespace. If no schemas have been added to the XmlSchemaSet, an empty collection is returned.

◆ set_CompilationSettings()

void System::Xml::Schema::XmlSchemaSet::set_CompilationSettings ( const SharedPtr< XmlSchemaCompilationSettings > &  value)

Sets the XmlSchemaCompilationSettings for the XmlSchemaSet.

Parameters
valueThe value to set.

◆ set_XmlResolver()

void System::Xml::Schema::XmlSchemaSet::set_XmlResolver ( const SharedPtr< System::Xml::XmlResolver > &  value)

Sets the XmlResolver used to resolve namespaces or locations referenced in include and import elements of a schema.

Parameters
valueThe value to set.

◆ ValidationEventHandler_add()

template<class... Args>
void System::Xml::Schema::XmlSchemaSet::ValidationEventHandler_add ( Args...  value)
inline

Adds an event handler for receiving information about XML Schema definition language (XSD) schema validation errors.

Parameters
valueA bound or static method or ValidationEventHandler instance.

◆ ValidationEventHandler_remove()

template<class... Args>
void System::Xml::Schema::XmlSchemaSet::ValidationEventHandler_remove ( Args...  value)
inline

Removes an event handler for receiving information about XML Schema definition language (XSD) schema validation errors.

Parameters
valueA bound or static method or ValidationEventHandler instance.