Aspose::Font::MultiLanguageString Class Reference

Represents multi language string. More...

Inherits System::Object.

Public Member Functions

ASPOSE_FONT_SHARED_API bool get_IsEmpty ()
 True, if MultiLanguageString don't have strings of languages More...
 
ASPOSE_FONT_SHARED_API MultiLanguageString ()
 Creates empty multi language string. More...
 
ASPOSE_FONT_SHARED_API void AddLanguageString (System::String str, int32_t languageId)
 Adds string of specific language. More...
 
ASPOSE_FONT_SHARED_API bool ContainsString (System::String str)
 Returns true if the string is present inside all the language strings. More...
 
ASPOSE_FONT_SHARED_API System::ArrayPtr< System::StringGetAllStrings ()
 Returns all strings of all languages. More...
 
ASPOSE_FONT_SHARED_API System::String GetEnglishString ()
 Returns english string if found. Otherwise returns first non-english string. More...
 
ASPOSE_FONT_SHARED_API System::ArrayPtr< int32_t > GetAllLanguageIds ()
 Gets language identifiers for all strings or empty array if no strings are presents More...
 
ASPOSE_FONT_SHARED_API System::String GetStringForLanguageId (int32_t languageId)
 Returns string related to language identifier passed, if found. Empty string otherwise. More...
 
ASPOSE_FONT_SHARED_API int32_t GetHashCode () const override
 GetHashCode implementation. More...
 
ASPOSE_FONT_SHARED_API bool Equals (System::SharedPtr< System::Object > objToCompare) override
 Returns true if objects are considered equal. More...
 
- 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...
 
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...
 
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 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 TypeInfoGetType () 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)
 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...
 
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

 MultiLanguageString (System::String str)
 Creates multi language string with english string inside. More...
 
 MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION (MultiLanguageString, CODEPORTING_ARGS(System::String str))
 
void AddLanguageString (System::SharedPtr< TtfTables::TtfNameTable::NameRecord > nameRecord)
 Adds string of specific language from NameRecord. If string is null, it won't be added More...
 
virtual ASPOSE_FONT_SHARED_API ~MultiLanguageString ()
 

Friends

ASPOSE_FONT_SHARED_API bool operator== (const System::SharedPtr< MultiLanguageString > &obj1, const System::String &obj2)
 
ASPOSE_FONT_SHARED_API bool operator== (const System::String &obj1, const System::SharedPtr< MultiLanguageString > &obj2)
 
ASPOSE_FONT_SHARED_API bool operator!= (const System::SharedPtr< MultiLanguageString > &obj1, const System::String &obj2)
 
ASPOSE_FONT_SHARED_API bool operator!= (const System::String &obj1, const System::SharedPtr< MultiLanguageString > &obj2)
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
- 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...
 

Detailed Description

Represents multi language string.

Constructor & Destructor Documentation

◆ MultiLanguageString() [1/2]

ASPOSE_FONT_SHARED_API Aspose::Font::MultiLanguageString::MultiLanguageString ( )

Creates empty multi language string.

◆ MultiLanguageString() [2/2]

Aspose::Font::MultiLanguageString::MultiLanguageString ( System::String  str)
protected

Creates multi language string with english string inside.

Parameters
strstring to add

◆ ~MultiLanguageString()

virtual ASPOSE_FONT_SHARED_API Aspose::Font::MultiLanguageString::~MultiLanguageString ( )
protectedvirtual

Member Function Documentation

◆ AddLanguageString() [1/2]

ASPOSE_FONT_SHARED_API void Aspose::Font::MultiLanguageString::AddLanguageString ( System::String  str,
int32_t  languageId 
)

Adds string of specific language.

Parameters
strString to add
languageIdLanguage identifier

◆ AddLanguageString() [2/2]

void Aspose::Font::MultiLanguageString::AddLanguageString ( System::SharedPtr< TtfTables::TtfNameTable::NameRecord nameRecord)
protected

Adds string of specific language from NameRecord. If string is null, it won't be added

Parameters
nameRecord

◆ ContainsString()

ASPOSE_FONT_SHARED_API bool Aspose::Font::MultiLanguageString::ContainsString ( System::String  str)

Returns true if the string is present inside all the language strings.

Parameters
strString to check.
Returns
True if the string is present inside all the language strings.

◆ Equals()

ASPOSE_FONT_SHARED_API bool Aspose::Font::MultiLanguageString::Equals ( System::SharedPtr< System::Object objToCompare)
override

Returns true if objects are considered equal.

Parameters
objToCompareobject to compare with
Returns
comparison result

◆ get_IsEmpty()

ASPOSE_FONT_SHARED_API bool Aspose::Font::MultiLanguageString::get_IsEmpty ( )

True, if MultiLanguageString don't have strings of languages

◆ GetAllLanguageIds()

ASPOSE_FONT_SHARED_API System::ArrayPtr<int32_t> Aspose::Font::MultiLanguageString::GetAllLanguageIds ( )

Gets language identifiers for all strings or empty array if no strings are presents

Returns
Array with language identifiers or empty array if no strings are present

◆ GetAllStrings()

ASPOSE_FONT_SHARED_API System::ArrayPtr<System::String> Aspose::Font::MultiLanguageString::GetAllStrings ( )

Returns all strings of all languages.

Returns
Array of all strings of all languages.

◆ GetEnglishString()

ASPOSE_FONT_SHARED_API System::String Aspose::Font::MultiLanguageString::GetEnglishString ( )

Returns english string if found. Otherwise returns first non-english string.

Returns
English string if found, otherwise first non-english string.

◆ GetHashCode()

ASPOSE_FONT_SHARED_API int32_t Aspose::Font::MultiLanguageString::GetHashCode ( ) const
overridevirtual

GetHashCode implementation.

Returns
hash code of object

Reimplemented from System::Object.

◆ GetStringForLanguageId()

ASPOSE_FONT_SHARED_API System::String Aspose::Font::MultiLanguageString::GetStringForLanguageId ( int32_t  languageId)

Returns string related to language identifier passed, if found. Empty string otherwise.

Parameters
languageIdlanguage identifier
Returns
String related to language identifier passed, if found. Empty string otherwise.

◆ MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION()

Aspose::Font::MultiLanguageString::MEMBER_FUNCTION_MAKE_OBJECT_DECLARATION ( MultiLanguageString  ,
CODEPORTING_ARGS(System::String str)   
)
protected

Friends And Related Function Documentation

◆ operator!= [1/2]

ASPOSE_FONT_SHARED_API bool operator!= ( const System::SharedPtr< MultiLanguageString > &  obj1,
const System::String obj2 
)
friend

◆ operator!= [2/2]

ASPOSE_FONT_SHARED_API bool operator!= ( const System::String obj1,
const System::SharedPtr< MultiLanguageString > &  obj2 
)
friend

◆ operator== [1/2]

ASPOSE_FONT_SHARED_API bool operator== ( const System::SharedPtr< MultiLanguageString > &  obj1,
const System::String obj2 
)
friend

◆ operator== [2/2]

ASPOSE_FONT_SHARED_API bool operator== ( const System::String obj1,
const System::SharedPtr< MultiLanguageString > &  obj2 
)
friend