//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "TypInfo_CPP.h"
#include "TypInfo_Delphi.hpp"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------

// BeginExample: TypInfoGetEnumName
// Record: TypInfo.TTypeInfo
// Type: TypInfo.PTypeInfo
// Record: TypInfo.TTypeData
// Type: TypInfo.PTypeData
// Record: TypInfo.TTypeKind
// Enumeration: TypInfo.TOrdType
// Enumeration: TypInfo.TFloatType
// Routine: TypInfo.GetEnumName
// Class: Generics.Collections.TList

// BeginCode
/*
Add the Delphi source file that appears on this Help page into
a CPP Builder project that includes a CPP module containing the
following code.  An hpp file will be generated for the Delphi
code when you build the project.  Add the include line for
that hpp file at the top of the CPP module.  The FormCreates
for both forms will execute and the following generics code
will work.  Remember to give the forms different names!
*/

void __fastcall TForm1::FormCreate(TObject *Sender)
{
  // Prints type info for string type
  TGenericClass__1<System::UnicodeString> *GString = new TGenericClass__1<System::UnicodeString>();
  GString->PrintTypeInfo(Memo1);

  // Prints type info for Byte type
  TGenericClass__1<Byte> *GByte = new TGenericClass__1<Byte>();
  GByte->PrintTypeInfo(Memo1);

  // Prints type info for Double type
  TGenericClass__1<Double> *GDouble = new TGenericClass__1<Double>();
  GDouble->PrintTypeInfo(Memo1);

  // Prints type info for "array of String" type
  // TGenericClass__1<array of string> *GStringArray = new TGenericClass__1<array of string>();
  // GStringArray->PrintTypeInfo(Memo1);
}
// EndCode
// EndExample: TypInfoGetEnumName
//---------------------------------------------------------------------------

