System::Xml::XmlParserContext Class Reference

Represents context information required by the XmlReader to parse an XML fragment. Objects of this class should only be allocated using System::MakeObject() function. Never create instance 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. More...

Inherits System::Object.

Public Types

typedef SharedPtr< XmlParserContextPtr
 An alias for a 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

 XmlParserContext (const XmlNameTable::Ptr &nt, const XmlNamespaceManager::Ptr &nsMgr, const String &lang, XmlSpace space, const SharedPtr< System::Text::Encoding > &enc=SharedPtr< System::Text::Encoding >())
 Constructs an XmlParserContext object and initializes it with the specified name table, namespace manager, xml:space, xml:lang and encoding values. More...
 
 XmlParserContext (const XmlNameTable::Ptr &nt, const XmlNamespaceManager::Ptr &nsMgr, const String &doctypename, const String &pubId, const String &sysId, const String &internalSubset, const String &baseuri, const String &lang, XmlSpace space, const SharedPtr< System::Text::Encoding > &enc=SharedPtr< System::Text::Encoding >())
 Constructs an XmlParserContext object and initializes it with the specified name table, namespace manager, document type name, public id, system id, internal DTD subset, base URI, xml:space, xml:lang and encoding values. More...
 
String get_BaseURI () const
 Returns the base URI. More...
 
void set_BaseURI (const String &value)
 Sets the specified base URI. More...
 
String get_DocTypeName () const
 Returns the name of the document type declarations. More...
 
void set_DocTypeName (const String &value)
 Sets the name of the document type declarations. More...
 
SharedPtr< System::Text::Encodingget_Encoding () const
 Returns the encoding used. More...
 
void set_Encoding (const SharedPtr< System::Text::Encoding > &value)
 Sets the encoding used. More...
 
String get_InternalSubset () const
 Returns the internal DTD subset. More...
 
void set_InternalSubset (const String &value)
 Sets the internal DTD subset. More...
 
XmlNamespaceManager::Ptr get_NamespaceManager () const
 Returns the name space manager. More...
 
void set_NamespaceManager (const XmlNamespaceManager::Ptr &value)
 Sets the name space manager. More...
 
XmlNameTable::Ptr get_NameTable () const
 Returns the name table. More...
 
void set_NameTable (const XmlNameTable::Ptr &value)
 Sets the name table. More...
 
String get_PublicId () const
 Returns the public ID. More...
 
void set_PublicId (const String &value)
 Sets the public ID. More...
 
String get_SystemId () const
 Returns the system ID. More...
 
void set_SystemId (const String &value)
 Sets the system ID. More...
 
String get_XmlLang () const
 Returns the xml:lang scope. More...
 
void set_XmlLang (const String &value)
 Sets the xml:lang scope. More...
 
XmlSpace get_XmlSpace () const
 Returns the xml:space scope. More...
 
void set_XmlSpace (XmlSpace value)
 Sets the xml:space scope. 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...
 

Public Attributes

String baseUri
 Base URI. More...
 
String docTypeName
 The name of the document type declarations. More...
 
SharedPtr< System::Text::Encodingencoding
 The encoding used. More...
 
String subset
 The internal DTD subset. More...
 
XmlNamespaceManager::Ptr nsManager
 The name space manager. More...
 
XmlNameTable::Ptr nameTable
 The name table. More...
 
String publicId
 The public ID. More...
 
String systemId
 The system ID. More...
 
String xmlLang
 The xml:lang scope. More...
 
XmlSpace xmlSpace
 The xml:space scope. More...
 

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

Represents context information required by the XmlReader to parse an XML fragment. Objects of this class should only be allocated using System::MakeObject() function. Never create instance 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 a shared pointer to an instance of this class.

Constructor & Destructor Documentation

◆ XmlParserContext() [1/2]

System::Xml::XmlParserContext::XmlParserContext ( const XmlNameTable::Ptr nt,
const XmlNamespaceManager::Ptr nsMgr,
const String lang,
XmlSpace  space,
const SharedPtr< System::Text::Encoding > &  enc = SharedPtrSystem::Text::Encoding >() 
)

Constructs an XmlParserContext object and initializes it with the specified name table, namespace manager, xml:space, xml:lang and encoding values.

Parameters
ntThe XmlNameTable object to be used by the object being constructed
nsMgrThe XmlNamespaceManager object to be used by the object being constructed
langThe xml:lang scope
spaceThe xml:space scope
encThe encoding used

◆ XmlParserContext() [2/2]

System::Xml::XmlParserContext::XmlParserContext ( const XmlNameTable::Ptr nt,
const XmlNamespaceManager::Ptr nsMgr,
const String doctypename,
const String pubId,
const String sysId,
const String internalSubset,
const String baseuri,
const String lang,
XmlSpace  space,
const SharedPtr< System::Text::Encoding > &  enc = SharedPtrSystem::Text::Encoding >() 
)

Constructs an XmlParserContext object and initializes it with the specified name table, namespace manager, document type name, public id, system id, internal DTD subset, base URI, xml:space, xml:lang and encoding values.

Parameters
ntThe XmlNameTable object to be used by the object being constructed
nsMgrThe XmlNamespaceManager object to be used by the object being constructed
doctypenameThe name of the document type declarations
pubIdThe public identifier
sysIdThe system identifier
internalSubsetThe internal DTD subset
baseuriThe base URI of the location from which the XML fragment was loaded
langThe xml:lang scope
spaceThe xml:space scope
encThe encoding used

Member Function Documentation

◆ get_BaseURI()

String System::Xml::XmlParserContext::get_BaseURI ( ) const

Returns the base URI.

◆ get_DocTypeName()

String System::Xml::XmlParserContext::get_DocTypeName ( ) const

Returns the name of the document type declarations.

◆ get_Encoding()

SharedPtr<System::Text::Encoding> System::Xml::XmlParserContext::get_Encoding ( ) const

Returns the encoding used.

◆ get_InternalSubset()

String System::Xml::XmlParserContext::get_InternalSubset ( ) const

Returns the internal DTD subset.

◆ get_NamespaceManager()

XmlNamespaceManager::Ptr System::Xml::XmlParserContext::get_NamespaceManager ( ) const

Returns the name space manager.

◆ get_NameTable()

XmlNameTable::Ptr System::Xml::XmlParserContext::get_NameTable ( ) const

Returns the name table.

◆ get_PublicId()

String System::Xml::XmlParserContext::get_PublicId ( ) const

Returns the public ID.

◆ get_SystemId()

String System::Xml::XmlParserContext::get_SystemId ( ) const

Returns the system ID.

◆ get_XmlLang()

String System::Xml::XmlParserContext::get_XmlLang ( ) const

Returns the xml:lang scope.

◆ get_XmlSpace()

XmlSpace System::Xml::XmlParserContext::get_XmlSpace ( ) const

Returns the xml:space scope.

◆ set_BaseURI()

void System::Xml::XmlParserContext::set_BaseURI ( const String value)

Sets the specified base URI.

Parameters
valueThe value to set

◆ set_DocTypeName()

void System::Xml::XmlParserContext::set_DocTypeName ( const String value)

Sets the name of the document type declarations.

◆ set_Encoding()

void System::Xml::XmlParserContext::set_Encoding ( const SharedPtr< System::Text::Encoding > &  value)

Sets the encoding used.

◆ set_InternalSubset()

void System::Xml::XmlParserContext::set_InternalSubset ( const String value)

Sets the internal DTD subset.

◆ set_NamespaceManager()

void System::Xml::XmlParserContext::set_NamespaceManager ( const XmlNamespaceManager::Ptr value)

Sets the name space manager.

◆ set_NameTable()

void System::Xml::XmlParserContext::set_NameTable ( const XmlNameTable::Ptr value)

Sets the name table.

◆ set_PublicId()

void System::Xml::XmlParserContext::set_PublicId ( const String value)

Sets the public ID.

◆ set_SystemId()

void System::Xml::XmlParserContext::set_SystemId ( const String value)

Sets the system ID.

◆ set_XmlLang()

void System::Xml::XmlParserContext::set_XmlLang ( const String value)

Sets the xml:lang scope.

◆ set_XmlSpace()

void System::Xml::XmlParserContext::set_XmlSpace ( XmlSpace  value)

Sets the xml:space scope.

Member Data Documentation

◆ baseUri

String System::Xml::XmlParserContext::baseUri

Base URI.

◆ docTypeName

String System::Xml::XmlParserContext::docTypeName

The name of the document type declarations.

◆ encoding

SharedPtr<System::Text::Encoding> System::Xml::XmlParserContext::encoding

The encoding used.

◆ nameTable

XmlNameTable::Ptr System::Xml::XmlParserContext::nameTable

The name table.

◆ nsManager

XmlNamespaceManager::Ptr System::Xml::XmlParserContext::nsManager

The name space manager.

◆ publicId

String System::Xml::XmlParserContext::publicId

The public ID.

◆ subset

String System::Xml::XmlParserContext::subset

The internal DTD subset.

◆ systemId

String System::Xml::XmlParserContext::systemId

The system ID.

◆ xmlLang

String System::Xml::XmlParserContext::xmlLang

The xml:lang scope.

◆ xmlSpace

XmlSpace System::Xml::XmlParserContext::xmlSpace

The xml:space scope.