Data.DBXJSONReflect.TTypeMarshaller.RegisterConverter

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure RegisterConverter(clazz: TClass; const Field: string;
Converter: TConverterEvent); overload;
procedure RegisterConverter(clazz: TClass; const Field: string;
func: TObjectsConverter); overload;
procedure RegisterConverter(clazz: TClass; const Field: string;
func: TObjectConverter); overload;
procedure RegisterConverter(clazz: TClass; const Field: string;
func: TStringsConverter); overload;
procedure RegisterConverter(clazz: TClass; const Field: string;
func: TStringConverter); overload;
procedure RegisterConverter(clazz: TClass; const func: TTypeObjectsConverter); overload;
procedure RegisterConverter(clazz: TClass; const func: TTypeObjectConverter); overload;
procedure RegisterConverter(clazz: TClass; const func: TTypeStringsConverter); overload;
procedure RegisterConverter(clazz: TClass; const func: TTypeStringConverter); overload;

C++

void __fastcall RegisterConverter(System::TClass clazz, const System::UnicodeString Field, TConverterEvent* Converter)/* overload */;
void __fastcall RegisterConverter(System::TClass clazz, const System::UnicodeString Field, _di_TObjectsConverter func)/* overload */;
void __fastcall RegisterConverter(System::TClass clazz, const System::UnicodeString Field, _di_TObjectConverter func)/* overload */;
void __fastcall RegisterConverter(System::TClass clazz, const System::UnicodeString Field, _di_TStringsConverter func)/* overload */;
void __fastcall RegisterConverter(System::TClass clazz, const System::UnicodeString Field, _di_TStringConverter func)/* overload */;
void __fastcall RegisterConverter(System::TClass clazz, const _di_TTypeObjectsConverter func)/* overload */;
void __fastcall RegisterConverter(System::TClass clazz, const _di_TTypeObjectConverter func)/* overload */;
void __fastcall RegisterConverter(System::TClass clazz, const _di_TTypeStringsConverter func)/* overload */;
void __fastcall RegisterConverter(System::TClass clazz, const _di_TTypeStringConverter func)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
Data.DBXJSONReflect.pas
Data.DBXJSONReflect.hpp
Data.DBXJSONReflect TTypeMarshaller

Description

Registers a user converter event.

The RegisterConverter method registers a user converter event. The converter event will be released by the destructor. The most general implementation of this function has three parameters: clazz (the object metaclass), field (the field name), and converter (the converter event implementation).

For writing efficient code, you can use one of the overloads of the RegisterConverter method. The following table lists the parameters types and the use of each method overload.



Parameter type Method description

TClass; string; TObjectsConverter

Convenience user converter registration for a list of objects.

TClass; string; TObjectConverter

Convenience user-defined converter registration for an object.

TClass; string; TStringsConverter

Convenience user-defined converter registration for an array of strings.

TClass; string; TStringConverter

Convenience user-defined converter registration for a string.

TClass; TTypeObjectsConverter

Convenience user converter registration for a list of objects.

TClass; TTypeObjectConverter

Convenience user-defined converter registration for an object.

TClass; TTypeStringsConverter

Convenience user-defined converter registration for an array of strings.

TClass; TTypeStringConverter

Convenience user-defined converter registration for a string.



See Also