CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
iconvertible.h
1
3#ifndef _aspose_system_iconvertible_h_
4#define _aspose_system_iconvertible_h_
5
6#include "system/object.h"
7#include "system/string.h"
8#include "system/decimal.h"
9#include "system/type_code.h"
10#include "system/date_time.h"
11#include "system/shared_ptr.h"
12#include "system/reflection.h"
13
14namespace System
15{
20 class ASPOSECPP_SHARED_CLASS IConvertible : virtual public Object
21 {
22 RTTI_INFO(System::IConvertible, ::System::BaseTypesInfo<System::Object>);
23 public:
24 using Object::ToString;
25
28 virtual ASPOSECPP_SHARED_API System::TypeCode GetTypeCode() = 0;
29
33 virtual ASPOSECPP_SHARED_API bool ToBoolean(System::SharedPtr<System::IFormatProvider> provider) = 0;
34
38 virtual ASPOSECPP_SHARED_API char_t ToChar(System::SharedPtr<System::IFormatProvider> provider) = 0;
39
43 virtual ASPOSECPP_SHARED_API int8_t ToSByte(System::SharedPtr<System::IFormatProvider> provider) = 0;
44
48 virtual ASPOSECPP_SHARED_API uint8_t ToByte(System::SharedPtr<System::IFormatProvider> provider) = 0;
49
53 virtual ASPOSECPP_SHARED_API int16_t ToInt16(System::SharedPtr<System::IFormatProvider> provider) = 0;
54
58 virtual ASPOSECPP_SHARED_API uint16_t ToUInt16(System::SharedPtr<System::IFormatProvider> provider) = 0;
59
63 virtual ASPOSECPP_SHARED_API int32_t ToInt32(System::SharedPtr<System::IFormatProvider> provider) = 0;
64
68 virtual ASPOSECPP_SHARED_API uint32_t ToUInt32(System::SharedPtr<System::IFormatProvider> provider) = 0;
69
73 virtual ASPOSECPP_SHARED_API int64_t ToInt64(System::SharedPtr<System::IFormatProvider> provider) = 0;
74
78 virtual ASPOSECPP_SHARED_API uint64_t ToUInt64(System::SharedPtr<System::IFormatProvider> provider) = 0;
79
83 virtual ASPOSECPP_SHARED_API float ToSingle(System::SharedPtr<System::IFormatProvider> provider) = 0;
84
88 virtual ASPOSECPP_SHARED_API double ToDouble(System::SharedPtr<System::IFormatProvider> provider) = 0;
89
93 virtual ASPOSECPP_SHARED_API System::Decimal ToDecimal(System::SharedPtr<System::IFormatProvider> provider) = 0;
94
99
103 virtual ASPOSECPP_SHARED_API System::String ToString(System::SharedPtr<System::IFormatProvider> provider) = 0;
104
109 virtual ASPOSECPP_SHARED_API System::SharedPtr<System::Object> ToType(const TypeInfo &conversionType, System::SharedPtr<System::IFormatProvider> provider) = 0;
110 };
111}
112
113#endif
Represents a specific date and time value on the time continuum. This type should be allocated on sta...
Definition: date_time.h:50
Represents a decimal number. This type should be allocated on stack and passed to functions by value ...
Definition: decimal.h:107
Defines methods that convert the value of the implementing reference or value type to a common langua...
Definition: iconvertible.h:21
virtual double ToDouble(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent double-precision floating-point number using the...
virtual System::String ToString(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent System::String using the specified culture-speci...
virtual System::DateTime ToDateTime(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent System::DateTime using the specified culture-spe...
virtual uint32_t ToUInt32(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent 32-bit uint32_teger using the specified culture-...
virtual System::TypeCode GetTypeCode()=0
Returns the type code for this instance.
virtual uint64_t ToUInt64(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent 64-bit uint32_teger using the specified culture-...
virtual int16_t ToInt16(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent 16-bit signed integer using the specified cultur...
virtual int64_t ToInt64(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent 64-bit signed integer using the specified cultur...
virtual System::Decimal ToDecimal(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent System::Decimal number using the specified cultu...
virtual bool ToBoolean(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent Boolean value using the specified culture-specif...
virtual float ToSingle(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent single-precision floating-point number using the...
virtual System::SharedPtr< System::Object > ToType(const TypeInfo &conversionType, System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to a System::Object of the specified System::Type that has an equ...
virtual char_t ToChar(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent Unicode character using the specified culture-sp...
virtual uint16_t ToUInt16(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent 16-bit uint32_teger using the specified culture-...
virtual uint8_t ToByte(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent 8-bit uint32_teger using the specified culture-s...
virtual int32_t ToInt32(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent 32-bit signed integer using the specified cultur...
virtual int8_t ToSByte(System::SharedPtr< System::IFormatProvider > provider)=0
Converts the value of this instance to an equivalent 8-bit signed integer using the specified culture...
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
virtual String ToString() const
Analog of C# Object.ToString() method. Enables converting custom objects to string.
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
Represents a particular type and provides information about it.
Definition: type_info.h:109
Definition: db_command.h:9
TypeCode
Represents the type of an object.
Definition: type_code.h:19