Inherits System::Object.
Public Types | |
using | Ptr = SharedPtr< XmlConvert > |
An alias for shared pointer to an instance of this class. More... | |
Public Types inherited from System::Object | |
typedef SmartPtr< Object > | ptr |
Alias for smart pointer type. More... | |
Static Public Member Functions | |
static ASPOSECPP_SHARED_API String | EncodeName (const String &name) |
static ASPOSECPP_SHARED_API String | EncodeNmToken (const String &name) |
static ASPOSECPP_SHARED_API String | EncodeLocalName (const String &name) |
static ASPOSECPP_SHARED_API String | DecodeName (const String &name) |
static ASPOSECPP_SHARED_API String | VerifyName (const String &name) |
static ASPOSECPP_SHARED_API String | VerifyNCName (const String &name) |
static ASPOSECPP_SHARED_API String | VerifyTOKEN (const String &token) |
static ASPOSECPP_SHARED_API String | VerifyNMTOKEN (const String &name) |
static ASPOSECPP_SHARED_API String | VerifyXmlChars (const String &content) |
static ASPOSECPP_SHARED_API String | VerifyPublicId (const String &publicId) |
static ASPOSECPP_SHARED_API String | VerifyWhitespace (const String &content) |
static ASPOSECPP_SHARED_API bool | IsStartNCNameChar (char16_t ch) |
static ASPOSECPP_SHARED_API bool | IsNCNameChar (char16_t ch) |
static ASPOSECPP_SHARED_API bool | IsXmlChar (char16_t ch) |
static ASPOSECPP_SHARED_API bool | IsXmlSurrogatePair (char16_t lowChar, char16_t highChar) |
static ASPOSECPP_SHARED_API bool | IsPublicIdChar (char16_t ch) |
static ASPOSECPP_SHARED_API bool | IsWhitespaceChar (char16_t ch) |
static ASPOSECPP_SHARED_API String | ToString (bool value) |
static ASPOSECPP_SHARED_API String | ToString (char16_t value) |
static ASPOSECPP_SHARED_API String | ToString (Decimal value) |
static ASPOSECPP_SHARED_API String | ToString (int8_t value) |
static ASPOSECPP_SHARED_API String | ToString (int16_t value) |
static ASPOSECPP_SHARED_API String | ToString (int32_t value) |
static ASPOSECPP_SHARED_API String | ToString (int64_t value) |
static ASPOSECPP_SHARED_API String | ToString (uint8_t value) |
static ASPOSECPP_SHARED_API String | ToString (uint16_t value) |
static ASPOSECPP_SHARED_API String | ToString (uint32_t value) |
static ASPOSECPP_SHARED_API String | ToString (uint64_t value) |
static ASPOSECPP_SHARED_API String | ToString (float value) |
static ASPOSECPP_SHARED_API String | ToString (double value) |
static ASPOSECPP_SHARED_API String | ToString (TimeSpan value) |
static ASPOSECPP_SHARED_API String | ToString (DateTime value) |
static ASPOSECPP_SHARED_API String | ToString (DateTime value, const String &format) |
static ASPOSECPP_SHARED_API String | ToString (DateTime value, XmlDateTimeSerializationMode dateTimeOption) |
static ASPOSECPP_SHARED_API String | ToString (DateTimeOffset value) |
static ASPOSECPP_SHARED_API String | ToString (DateTimeOffset value, const String &format) |
static ASPOSECPP_SHARED_API String | ToString (Guid value) |
static ASPOSECPP_SHARED_API bool | ToBoolean (String s) |
static ASPOSECPP_SHARED_API char16_t | ToChar (const String &s) |
static ASPOSECPP_SHARED_API Decimal | ToDecimal (const String &s) |
static ASPOSECPP_SHARED_API int8_t | ToSByte (const String &s) |
static ASPOSECPP_SHARED_API int16_t | ToInt16 (const String &s) |
static ASPOSECPP_SHARED_API int32_t | ToInt32 (const String &s) |
static ASPOSECPP_SHARED_API int64_t | ToInt64 (const String &s) |
static ASPOSECPP_SHARED_API uint8_t | ToByte (const String &s) |
static ASPOSECPP_SHARED_API uint16_t | ToUInt16 (const String &s) |
static ASPOSECPP_SHARED_API uint32_t | ToUInt32 (const String &s) |
static ASPOSECPP_SHARED_API uint64_t | ToUInt64 (const String &s) |
static ASPOSECPP_SHARED_API float | ToSingle (String s) |
static ASPOSECPP_SHARED_API double | ToDouble (String s) |
static ASPOSECPP_SHARED_API TimeSpan | ToTimeSpan (const String &s) |
static ASPOSECPP_SHARED_API DateTime | ToDateTime (const String &s) |
static ASPOSECPP_SHARED_API DateTime | ToDateTime (const String &s, const String &format) |
static ASPOSECPP_SHARED_API DateTime | ToDateTime (const String &s, const ArrayPtr< String > &formats) |
static ASPOSECPP_SHARED_API DateTime | ToDateTime (const String &s, XmlDateTimeSerializationMode dateTimeOption) |
static ASPOSECPP_SHARED_API DateTimeOffset | ToDateTimeOffset (const String &s) |
static ASPOSECPP_SHARED_API DateTimeOffset | ToDateTimeOffset (const String &s, const String &format) |
static ASPOSECPP_SHARED_API DateTimeOffset | ToDateTimeOffset (const String &s, const ArrayPtr< String > &formats) |
static ASPOSECPP_SHARED_API Guid | ToGuid (const String &s) |
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 TypeInfo & | Type () |
Implements C# typeof(System.Object) construct. More... | |
Additional Inherited Members | |
Public Member Functions inherited from System::Object | |
ASPOSECPP_SHARED_API | Object () |
Creates object. Initializes all internal data structures. More... | |
virtual ASPOSECPP_SHARED_API | ~Object () |
Destroys object. Frees all internal data structures. More... | |
ASPOSECPP_SHARED_API | Object (Object const &x) |
Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object & | operator= (Object const &x) |
Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object * | SharedRefAdded () |
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... | |
ASPOSECPP_SHARED_API void | Lock () |
Implements C# lock() statement locking. Call directly or use LockContext sentry object. More... | |
ASPOSECPP_SHARED_API void | Unlock () |
Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More... | |
virtual ASPOSECPP_SHARED_API bool | Equals (ptr obj) |
Compares objects using C# Object.Equals semantics. More... | |
virtual ASPOSECPP_SHARED_API int32_t | GetHashCode () const |
Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More... | |
virtual ASPOSECPP_SHARED_API String | ToString () const |
Analog of C# Object.ToString() method. Enables converting custom objects to string. More... | |
virtual ASPOSECPP_SHARED_API ptr | MemberwiseClone () const |
Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More... | |
virtual ASPOSECPP_SHARED_API const TypeInfo & | GetType () const |
Gets actual type of object. Analog of C# System.Object.GetType() call. More... | |
virtual ASPOSECPP_SHARED_API bool | Is (const TypeInfo &targetType) const |
Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More... | |
virtual ASPOSECPP_SHARED_API 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 ASPOSECPP_SHARED_API bool | FastCast (const Details::FastRttiBase &helper, void **out_ptr) const |
For internal purposes only. More... | |
template<> | |
bool | Equals (float const &objA, float const &objB) |
template<> | |
bool | Equals (double const &objA, double const &objB) |
template<> | |
bool | ReferenceEquals (String const &str, std::nullptr_t) |
template<> | |
bool | ReferenceEquals (String const &str1, String const &str2) |
Encodes and decodes XML names, and provides methods for converting between runtime types and XML Schema definition language (XSD) types. When converting data types, the values returned are locale-independent.
An alias for shared pointer to an instance of this class.
|
static |
Decodes a name. This method does the reverse of the XmlConvert::EncodeName(String) and XmlConvert::EncodeLocalName(String) methods.
name | The name to be transformed. |
|
static |
Converts the name to a valid XML local name.
name | The name to be encoded. |
|
static |
Converts the name to a valid XML name.
name | A name to be translated. |
|
static |
Verifies the name is valid according to the XML specification.
name | The name to be encoded. |
|
static |
Checks whether the passed-in character is a valid non-colon character type.
ch | The character to verify as a non-colon character. |
true
if the character is a valid non-colon character type; otherwise, false
.
|
static |
Returns the passed-in character instance if the character in the argument is a valid public id character, otherwise nullptr
.
ch | Char object to validate. |
nullptr
.
|
static |
Checks if the passed-in character is a valid Start Name Character type.
ch | The character to validate. |
true
if the character is a valid Start Name Character type; otherwise, false
.
|
static |
Checks if the passed-in character is a valid XML whitespace character.
ch | The character to validate. |
true
if the passed in character is a valid XML whitespace character; otherwise, false
.
|
static |
Checks if the passed-in character is a valid XML character.
ch | The character to validate. |
true
if the passed in character is a valid XML character; otherwise, false
.
|
static |
Checks if the passed-in surrogate pair of characters is a valid XML character.
lowChar | The surrogate character to validate. |
highChar | The surrogate character to validate. |
true
if the passed in surrogate pair of characters is a valid XML character; otherwise, false
.
|
static |
|
static |
Converts the String to a Byte equivalent.
s | The string to convert. |
Byte
equivalent of the string. ArgumentNullException | s is nullptr . |
FormatException | s is not in the correct format. |
OverflowException | s represents a number less than Byte::MinValue or greater than Byte::MaxValue. |
|
static |
|
static |
Converts the String to a DateTime equivalent.
s | The string to convert. |
format | The format structure to apply to the converted DateTime. Valid formats include "yyyy-MM-ddTHH:mm:sszzzzzz" and its subsets. The string is validated against this format. |
ArgumentNullException | s is nullptr . |
FormatException | s or format is String::Empty or s does not contain a date and time that corresponds to format . |
|
static |
Converts the String to a DateTime equivalent.
s | The string to convert. |
formats | An array containing the format structures to apply to the converted DateTime. Valid formats include "yyyy-MM-ddTHH:mm:sszzzzzz" and its subsets. |
ArgumentNullException | s is nullptr . |
FormatException | s or an element of formats is String::Empty or s does not contain a date and time that corresponds to any of the elements of formats . |
|
static |
Converts the String to a DateTime using the XmlDateTimeSerializationMode specified.
s | The String value to convert. |
dateTimeOption | One of the enumeration values that specify whether the date should be converted to local time or preserved as Coordinated Universal Time (UTC), if it is a UTC date. |
NullReferenceException | s is nullptr . |
ArgumentNullException | dateTimeOption is nullptr . |
FormatException | s is an empty string or is not in a valid format. |
|
static |
Converts the supplied String to a DateTimeOffset equivalent.
s | The string to convert. The string must conform to a subset of the W3C Recommendation for the XML dateTime type. For more information, see the dateTime section of the XML Schema specification. |
ArgumentNullException | s is nullptr . |
ArgumentOutOfRangeException | The argument passed to this method is outside the range of allowable values. For information about allowable values, see DateTimeOffset. |
FormatException | The argument passed to this method does not conform to a subset of the W3C Recommendations for the XML dateTime type. For more information, see the dateTime section of the XML Schema specification. |
|
static |
Converts the supplied String to a DateTimeOffset equivalent.
s | The string to convert. |
format | The format from which s is converted. The format parameter can be any subset of the W3C Recommendation for the XML dateTime type. For more information, see the dateTime section of the XML Schema specification. The string s is validated against this format. |
ArgumentNullException | s is nullptr . |
FormatException | s or format is an empty string or is not in the specified format. |
|
static |
Converts the supplied String to a DateTimeOffset equivalent.
s | The string to convert. |
formats | An array of formats from which s can be converted. Each format in formats can be any subset of the W3C Recommendation for the XML dateTime type. For more information, see the dateTime section of the XML Schema specification. The string s is validated against one of these formats. |
Converts the String to a Decimal equivalent.
s | The string to convert. |
Decimal
equivalent of the string. ArgumentNullException | s is nullptr . |
FormatException | s is not in the correct format. |
OverflowException | s represents a number less than Decimal::MinValue or greater than Decimal::MaxValue. |
|
static |
Converts the String to a Double equivalent.
s | The string to convert. |
ArgumentNullException | s is nullptr . |
FormatException | s is not in the correct format. |
OverflowException | s represents a number less than Double::MinValue or greater than Double::MaxValue. |
|
static |
Converts the String to a Int16 equivalent.
s | The string to convert. |
ArgumentNullException | s is nullptr . |
FormatException | s is not in the correct format. |
OverflowException | s represents a number less than Int16::MinValue or greater than Int16::MaxValue. |
|
static |
Converts the String to a Int32 equivalent.
s | The string to convert. |
ArgumentNullException | s is nullptr . |
FormatException | s is not in the correct format. |
OverflowException | s represents a number less than Int32::MinValue or greater than Int32::MaxValue. |
|
static |
Converts the String to a Int64 equivalent.
s | The string to convert. |
ArgumentNullException | s is nullptr . |
FormatException | s is not in the correct format. |
OverflowException | s represents a number less than Int64::MinValue or greater than Int64::MaxValue. |
|
static |
Converts the String to a SByte equivalent.
s | The string to convert. |
SByte
equivalent of the string. ArgumentNullException | s is nullptr . |
FormatException | s is not in the correct format. |
OverflowException | s represents a number less than SByte::MinValue or greater than SByte::MaxValue. |
|
static |
Converts the String to a Single equivalent.
s | The string to convert. |
ArgumentNullException | s is nullptr . |
FormatException | s is not in the correct format. |
OverflowException | s represents a number less than Single::MinValue or greater than Single::MaxValue. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Converts the DateTime to a String using the XmlDateTimeSerializationMode specified.
value | The DateTime value to convert. |
dateTimeOption | One of the XmlDateTimeSerializationMode values that specify how to treat the DateTime value. |
ArgumentException | The dateTimeOption value is not valid. |
ArgumentNullException | The value or dateTimeOption value is nullptr . |
|
static |
Converts the supplied DateTimeOffset to a String.
value | The DateTimeOffset to be converted. |
|
static |
Converts the supplied DateTimeOffset to a String in the specified format.
value | The DateTimeOffset to be converted. |
format | The format to which s is converted. The format parameter can be any subset of the W3C Recommendation for the XML dateTime type. For more information, see the dateTime section of the XML Schema specification. |
Converts the String to a TimeSpan equivalent.
s | The string to convert. The string format must conform to the W3C XML Schema Part 2: Datatypes recommendation for duration. |
FormatException | s is not in correct format to represent a TimeSpan value. |
|
static |
Converts the String to a UInt16 equivalent.
s | The string to convert. |
ArgumentNullException | s is nullptr . |
FormatException | s is not in the correct format. |
OverflowException | s represents a number less than UInt16::MinValue or greater than UInt16::MaxValue. |
|
static |
Converts the String to a UInt32 equivalent.
s | The string to convert. |
ArgumentNullException | s is nullptr . |
FormatException | s is not in the correct format. |
OverflowException | s represents a number less than UInt32::MinValue or greater than UInt32::MaxValue. |
|
static |
Converts the String to a UInt64 equivalent.
s | The string to convert. |
ArgumentNullException | s is nullptr . |
FormatException | s is not in the correct format. |
OverflowException | s represents a number less than UInt64::MinValue or greater than UInt64::MaxValue. |
|
static |
Verifies that the name is a valid name according to the W3C Extended Markup Language recommendation.
name | The name to verify. |
XmlException | name is not a valid XML name. |
ArgumentNullException | name is nullptr or String::Empty. |
|
static |
Verifies that the name is a valid NCName
according to the W3C Extended Markup Language recommendation. An NCName
is a name that cannot contain a colon.
name | The name to verify. |
ArgumentNullException | name is nullptr or String::Empty. |
XmlException | name is not a valid non-colon name. |
|
static |
Verifies that the string is a valid NMTOKEN according to the W3C XML Schema Part2: Datatypes recommendation.
name | The string you wish to verify. |
XmlException | The string is not a valid name token. |
ArgumentNullException | name is nullptr . |
|
static |
Returns the passed in string instance if all the characters in the string argument are valid public id characters.
publicId | String that contains the id to validate. |
|
static |
Verifies that the string is a valid token according to the W3C XML Schema Part2: Datatypes recommendation.
token | The string value you wish to verify. |
XmlException | The string value is not a valid token. |
|
static |
Returns the passed-in string instance if all the characters in the string argument are valid whitespace characters.
content | String to verify. |
nullptr
.
|
static |
Returns the passed-in string if all the characters and surrogate pair characters in the string argument are valid XML characters, otherwise an XmlException is thrown with information on the first invalid character encountered.
content | String that contains characters to verify. |