TTypeToken Record
Identifies a Delphi type for the JSON converter system.
Remarks
TTypeToken wraps a PTypeInfo pointer and an optional item type pointer for generic collection types. It is used as the key for locating and caching IJsonTypeConverter instances in TJsonConverters.
Implicit operators allow transparent conversion from PTypeInfo and TClass.
Syntax
Unit: Bcl.Json.Converters
TTypeToken = record;
Constructors
| Name | Description |
|---|---|
| Create | Overloaded Create(PTypeInfo) Create(PTypeInfo, PTypeInfo) |
Methods
| Name | Description |
|---|---|
| IsClass | Indicates whether the token represents a class type. |
| GetClass | Returns the class type represented by this token. |
| GetItemClass | Returns the class type of the item (element) type. |
Operators
| Name | Description |
|---|---|
| Equality | Adapts the = operator so it returns true when both instances have the same values. |
| Implicit Conversion | Overloaded Implicit conversion from PTypeInfo to TTypeToken Implicit conversion from TClass to TTypeToken Implicit conversion from TTypeToken to PTypeInfo |
Properties
| Name | Description |
|---|---|
| TypeInfo | Returns the primary RTTI type information pointer. |
| ItemTypeInfo | Returns the item (element) RTTI type information pointer for generic collection types. |