CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
type_converter.h
1
2#ifndef _system_component_model_type_converter_h_
3#define _system_component_model_type_converter_h_
4
5#include <system/type_info.h>
6#include <system/shared_ptr.h>
7#include <system/object.h>
8#include <system/component_model/itype_descriptor_context.h>
9#include <system/globalization/culture_info.h>
10
11namespace System { namespace ComponentModel {
12
17class ASPOSECPP_SHARED_CLASS TypeConverter : public System::Object
18{
20 typedef TypeConverter ThisType;
24 ASPOSECPP_SHARED_RTTI_INFO_DECL();
25
26public:
28 ASPOSECPP_SHARED_API TypeConverter();
29
34 // override this in deriverd class for ConvertFrom
71
76 ASPOSECPP_SHARED_API System::SharedPtr<System::Object> ConvertTo(const System::SharedPtr<System::Object>& value, const System::TypeInfo& destinationType);
77 // override this in derived class to implement ConvertTo
109};
110
111}} // namespace System::ComponentModel
112
113#endif // _system_component_model_type_converter_h_
114
Class that handles type conversion in component model. Objects of this class should only be allocated...
Definition: type_converter.h:18
System::String ConvertToInvariantString(const System::SharedPtr< ITypeDescriptorContext > &context, const System::SharedPtr< System::Object > &value)
Converts object to invariant string.
virtual System::SharedPtr< System::Object > ConvertFrom(const System::SharedPtr< ITypeDescriptorContext > &context, const System::SharedPtr< System::Globalization::CultureInfo > &culture, const System::SharedPtr< System::Object > &value)
Converts objects.
System::String ConvertToString(const System::SharedPtr< ITypeDescriptorContext > &context, const System::SharedPtr< System::Globalization::CultureInfo > &culture, const System::SharedPtr< System::Object > &value)
Converts object to string.
System::SharedPtr< System::Object > ConvertFrom(const System::SharedPtr< ITypeDescriptorContext > &context, const System::SharedPtr< System::Globalization::CultureInfo > &culture, const System::String &value)
Converts string to object.
System::SharedPtr< System::Object > ConvertFromInvariantString(const System::String &text)
Converts invariant string to object.
System::String ConvertToString(const System::SharedPtr< System::Object > &value)
Converts object to string.
System::SharedPtr< System::Object > ConvertFromInvariantString(const System::SharedPtr< ITypeDescriptorContext > &context, const System::String &text)
Converts invariant string to object.
virtual System::SharedPtr< System::Object > ConvertTo(const System::SharedPtr< ITypeDescriptorContext > &context, const System::SharedPtr< System::Globalization::CultureInfo > &culture, const System::SharedPtr< System::Object > &value, const System::TypeInfo &destinationType)
Converts object to specific type.
System::SharedPtr< System::Object > ConvertFromString(const System::SharedPtr< ITypeDescriptorContext > &context, const System::String &text)
Converts string to object.
System::String ConvertToInvariantString(const System::SharedPtr< System::Object > &value)
Converts object to invariant string.
System::SharedPtr< System::Object > ConvertFrom(const System::SharedPtr< System::Object > &value)
Converts objects.
System::SharedPtr< System::Object > ConvertTo(const System::SharedPtr< System::Object > &value, const System::TypeInfo &destinationType)
Converts object to specific type.
System::SharedPtr< System::Object > ConvertFromString(const System::String &text)
Converts string to object.
System::String ConvertToString(const System::SharedPtr< ITypeDescriptorContext > &context, const System::SharedPtr< System::Object > &value)
Converts object to string.
System::SharedPtr< System::Object > ConvertFromString(const System::SharedPtr< ITypeDescriptorContext > &context, const System::SharedPtr< System::Globalization::CultureInfo > &culture, const System::String &text)
Converts string to object.
Base class that enables using methods available for System.Object class in C#. All non-trivial classe...
Definition: object.h:62
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