CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
i_formatter_converter.h
1
2#pragma once
3
4#include <system/type_info.h>
5#include <system/type_code.h>
6#include <system/string.h>
7#include <system/shared_ptr.h>
8#include <system/object.h>
9#include <system/decimal.h>
10#include <system/date_time.h>
11#include <cstdint>
12
13namespace System {
14
15namespace Runtime {
16
17namespace Serialization {
18
21class ASPOSECPP_SHARED_CLASS IFormatterConverter : public System::Object
22{
28 typedef ::System::BaseTypesInfo<BaseType> ThisTypeBaseTypesInfo;
30 RTTI_INFO(IFormatterConverter, ThisTypeBaseTypesInfo)
31
32public:
33
47 virtual bool ToBoolean(System::SharedPtr<Object> value) = 0;
51 virtual uint8_t ToByte(System::SharedPtr<Object> value) = 0;
55 virtual char16_t ToChar(System::SharedPtr<Object> value) = 0;
67 virtual double ToDouble(System::SharedPtr<Object> value) = 0;
71 virtual int16_t ToInt16(System::SharedPtr<Object> value) = 0;
75 virtual int32_t ToInt32(System::SharedPtr<Object> value) = 0;
79 virtual int64_t ToInt64(System::SharedPtr<Object> value) = 0;
83 virtual int8_t ToSByte(System::SharedPtr<Object> value) = 0;
87 virtual float ToSingle(System::SharedPtr<Object> value) = 0;
95 virtual uint16_t ToUInt16(System::SharedPtr<Object> value) = 0;
99 virtual uint32_t ToUInt32(System::SharedPtr<Object> value) = 0;
103 virtual uint64_t ToUInt64(System::SharedPtr<Object> value) = 0;
104
105};
106
107} // namespace Serialization
108} // namespace Runtime
109} // namespace System
110
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
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
Provides the connection between an instance of System::Runtime::Serialization::SerializationInfo and ...
Definition: i_formatter_converter.h:22
virtual char16_t ToChar(System::SharedPtr< Object > value)=0
Converts a value to a char16_t.
virtual DateTime ToDateTime(System::SharedPtr< Object > value)=0
Converts a value to a DateTime.
virtual int32_t ToInt32(System::SharedPtr< Object > value)=0
Converts a value to a int32_t.
virtual double ToDouble(System::SharedPtr< Object > value)=0
Converts a value to a double.
virtual bool ToBoolean(System::SharedPtr< Object > value)=0
Converts a value to a bool.
virtual float ToSingle(System::SharedPtr< Object > value)=0
Converts a value to a float.
virtual uint8_t ToByte(System::SharedPtr< Object > value)=0
Converts a value to a uint8_t.
virtual int16_t ToInt16(System::SharedPtr< Object > value)=0
Converts a value to a int16_t.
virtual int8_t ToSByte(System::SharedPtr< Object > value)=0
Converts a value to a int8_t.
virtual String ToString(System::SharedPtr< Object > value)=0
Converts a value to a String.
virtual uint16_t ToUInt16(System::SharedPtr< Object > value)=0
Converts a value to a uint16_t.
virtual int64_t ToInt64(System::SharedPtr< Object > value)=0
Converts a value to a int64_t.
virtual uint32_t ToUInt32(System::SharedPtr< Object > value)=0
Converts a value to a uint32_t.
virtual uint64_t ToUInt64(System::SharedPtr< Object > value)=0
Converts a value to a uint64_t.
virtual Decimal ToDecimal(System::SharedPtr< Object > value)=0
Converts a value to a Decimal.
virtual System::SharedPtr< Object > Convert(System::SharedPtr< Object > value, const TypeInfo &type)=0
RTTI information.
virtual System::SharedPtr< Object > Convert(System::SharedPtr< Object > value, TypeCode typeCode)=0
Converts a value to the given System::TypeCode.
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