System.TypInfo.GetSetElementValue

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetSetElementValue(TypeInfo: PTypeInfo; const Name: string): Integer;

C++

extern DELPHI_PACKAGE int __fastcall GetSetElementValue(PTypeInfo TypeInfo, const System::UnicodeString Name);

Properties

Type Visibility Source Unit Parent
function public
System.TypInfo.pas
System.TypInfo.hpp
System.TypInfo System.TypInfo

Description

Returns the integer representation of a given constant identified by its name.

Use GetSetElementValue to convert a constant identified by its symbolic name to an integer.

TypeInfo is the type information record that describes the type for which the constant has a meaning. You can obtain the type information for a type by calling the TypeInfo function in Delphi or the __delphirtti operator in C++.

Value is the constant, represented as a string.

GetSetElementValue returns the integer that represents the specified value.

If TypeInfo describes an Integer type, Value is assumed to be a string representation of an integer and is converted to an integer. If TypeInfo describes a char type, an integer containing the character code is returned. If TypeInfo describes an enumerated type, GetEnumValue returns the integer representation of Value.

See Also