home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 May / PCP163A.iso / Runimage / Cbuilder4 / Include / Vcl / TYPINFO.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1999-01-26  |  6.5 KB  |  235 lines

  1. // Borland C++ Builder
  2. // Copyright (c) 1995, 1999 by Borland International
  3. // All rights reserved
  4.  
  5. // (DO NOT EDIT: machine generated header) 'TypInfo.pas' rev: 4.00
  6.  
  7. #ifndef TypInfoHPP
  8. #define TypInfoHPP
  9.  
  10. #pragma delphiheader begin
  11. #pragma option push -w-
  12. #include <SysUtils.hpp>    // Pascal unit
  13. #include <SysInit.hpp>    // Pascal unit
  14. #include <System.hpp>    // Pascal unit
  15.  
  16. //-- user supplied -----------------------------------------------------------
  17. namespace Typinfo
  18. {
  19.   enum TParamFlag {pfVar, pfConst, pfArray, pfAddress, pfReference, pfOut};
  20.   enum TIntfFlag {ifHasGuid, ifDispInterface, ifDispatch};
  21.   struct  TTypeInfo;
  22.   typedef TTypeInfo *PTypeInfo;
  23.   typedef SetBase<TParamFlag, pfVar, pfOut> TParamFlagsBase;
  24.   typedef SetBase<TIntfFlag, ifHasGuid, ifDispatch> TIntfFlagsBase;
  25. }
  26.  
  27. namespace Typinfo
  28. {
  29. //-- type declarations -------------------------------------------------------
  30. #pragma option push -b-
  31. enum TTypeKind { tkUnknown, tkInteger, tkChar, tkEnumeration, tkFloat, tkString, tkSet, tkClass, tkMethod, 
  32.     tkWChar, tkLString, tkWString, tkVariant, tkArray, tkRecord, tkInterface, tkInt64, tkDynArray };
  33. #pragma option pop
  34.  
  35. typedef Set<TTypeKind, tkUnknown, tkDynArray>  TTypeKinds;
  36.  
  37. #pragma option push -b-
  38. enum TOrdType { otSByte, otUByte, otSWord, otUWord, otSLong };
  39. #pragma option pop
  40.  
  41. #pragma option push -b-
  42. enum TFloatType { ftSingle, ftDouble, ftExtended, ftComp, ftCurr };
  43. #pragma option pop
  44.  
  45. #pragma option push -b-
  46. enum TMethodKind { mkProcedure, mkFunction, mkConstructor, mkDestructor, mkClassProcedure, mkClassFunction, 
  47.     mkSafeProcedure, mkSafeFunction };
  48. #pragma option pop
  49.  
  50. typedef Set<TParamFlag, pfVar, pfOut>  TParamFlags;
  51.  
  52. typedef Set<TIntfFlag, ifHasGuid, ifDispatch>  TIntfFlags;
  53.  
  54. struct TTypeInfo;
  55. typedef TTypeInfo *PTypeInfo;
  56.  
  57. typedef PTypeInfo *PPTypeInfo;
  58.  
  59. #pragma pack(push, 1)
  60. struct TTypeInfo
  61. {
  62.     TTypeKind Kind;
  63.     System::ShortString Name;
  64. } ;
  65. #pragma pack(pop)
  66.  
  67. struct TTypeData;
  68. typedef TTypeData *PTypeData;
  69.  
  70. #pragma pack(push, 1)
  71. struct TTypeData
  72. {
  73.     
  74.     union
  75.     {
  76.         struct 
  77.         {
  78.             __int64 MinInt64Value;
  79.             __int64 MaxInt64Value;
  80.             
  81.         };
  82.         struct 
  83.         {
  84.             PTypeInfo *IntfParent;
  85.             TIntfFlagsBase IntfFlags;
  86.             GUID Guid;
  87.             ShortStringBase IntfUnit;
  88.             
  89.         };
  90.         struct 
  91.         {
  92.             TMethodKind MethodKind;
  93.             Byte ParamCount;
  94.             char ParamList[1024];
  95.             
  96.         };
  97.         struct 
  98.         {
  99.             TMetaClass*ClassType;
  100.             PTypeInfo *ParentInfo;
  101.             short PropCount;
  102.             ShortStringBase UnitName;
  103.             
  104.         };
  105.         struct 
  106.         {
  107.             Byte MaxLength;
  108.             
  109.         };
  110.         struct 
  111.         {
  112.             TFloatType FloatType;
  113.             
  114.         };
  115.         struct 
  116.         {
  117.             TOrdType OrdType;
  118.             union
  119.             {
  120.                 struct 
  121.                 {
  122.                     PTypeInfo *CompType;
  123.                     
  124.                 };
  125.                 struct 
  126.                 {
  127.                     int MinValue;
  128.                     int MaxValue;
  129.                     union
  130.                     {
  131.                         struct 
  132.                         {
  133.                             PTypeInfo *BaseType;
  134.                             ShortStringBase NameList;
  135.                             
  136.                         };
  137.                         
  138.                     };
  139.                 };
  140.                 
  141.             };
  142.         };
  143.         
  144.     };
  145. } ;
  146. #pragma pack(pop)
  147.  
  148. #pragma pack(push, 1)
  149. struct TypInfo__1
  150. {
  151.     
  152. } ;
  153. #pragma pack(pop)
  154.  
  155. #pragma pack(push, 1)
  156. struct TPropData
  157. {
  158.     Word PropCount;
  159.     TypInfo__1 PropList;
  160. } ;
  161. #pragma pack(pop)
  162.  
  163. struct TPropInfo;
  164. typedef TPropInfo *PPropInfo;
  165.  
  166. #pragma pack(push, 1)
  167. struct TPropInfo
  168. {
  169.     PTypeInfo *PropType;
  170.     void *GetProc;
  171.     void *SetProc;
  172.     void *StoredProc;
  173.     int Index;
  174.     int Default;
  175.     short NameIndex;
  176.     System::ShortString Name;
  177. } ;
  178. #pragma pack(pop)
  179.  
  180. typedef void __fastcall (__closure *TPropInfoProc)(PPropInfo PropInfo);
  181.  
  182. typedef TPropInfo *TPropList[16380];
  183.  
  184. typedef PPropInfo *PPropList;
  185.  
  186. typedef AnsiString TypInfo__2[2];
  187.  
  188. //-- var, const, procedure ---------------------------------------------------
  189. #define tkAny (System::Set<TTypeKind, tkUnknown, tkDynArray> () << tkUnknown << tkInteger << tkChar \
  190.     << tkEnumeration << tkFloat << tkString << tkSet << tkClass << tkMethod << tkWChar << tkLString << tkWString \
  191.     << tkVariant << tkArray << tkRecord << tkInterface << tkInt64 << tkDynArray )
  192. #define tkMethods (System::Set<TTypeKind, tkUnknown, tkDynArray> () << tkMethod )
  193. #define tkProperties (System::Set<TTypeKind, tkUnknown, tkDynArray> () << tkInteger << tkChar << tkEnumeration \
  194.     << tkFloat << tkString << tkSet << tkClass << tkWChar << tkLString << tkWString << tkVariant << tkArray \
  195.     << tkRecord << tkInterface << tkInt64 << tkDynArray )
  196. extern PACKAGE AnsiString BooleanIdents[2];
  197. extern PACKAGE AnsiString DotSep;
  198. extern PACKAGE PTypeData __fastcall GetTypeData(PTypeInfo TypeInfo);
  199. extern PACKAGE AnsiString __fastcall GetEnumName(PTypeInfo TypeInfo, int Value);
  200. extern PACKAGE int __fastcall GetEnumValue(PTypeInfo TypeInfo, const AnsiString Name);
  201. extern PACKAGE PPropInfo __fastcall GetPropInfo(PTypeInfo TypeInfo, const AnsiString PropName);
  202. extern PACKAGE void __fastcall GetPropInfos(PTypeInfo TypeInfo, PPropList PropList);
  203. extern PACKAGE int __fastcall GetPropList(PTypeInfo TypeInfo, TTypeKinds TypeKinds, PPropList PropList
  204.     );
  205. extern PACKAGE bool __fastcall IsStoredProp(System::TObject* Instance, PPropInfo PropInfo);
  206. extern PACKAGE int __fastcall GetOrdProp(System::TObject* Instance, PPropInfo PropInfo);
  207. extern PACKAGE void __fastcall SetOrdProp(System::TObject* Instance, PPropInfo PropInfo, int Value);
  208.     
  209. extern PACKAGE AnsiString __fastcall GetStrProp(System::TObject* Instance, PPropInfo PropInfo);
  210. extern PACKAGE void __fastcall SetStrProp(System::TObject* Instance, PPropInfo PropInfo, const AnsiString 
  211.     Value);
  212. extern PACKAGE Extended __fastcall GetFloatProp(System::TObject* Instance, PPropInfo PropInfo);
  213. extern PACKAGE void __fastcall SetFloatProp(System::TObject* Instance, PPropInfo PropInfo, Extended 
  214.     Value);
  215. extern PACKAGE Variant __fastcall GetVariantProp(System::TObject* Instance, PPropInfo PropInfo);
  216. extern PACKAGE void __fastcall SetVariantProp(System::TObject* Instance, PPropInfo PropInfo, const Variant 
  217.     &Value);
  218. extern PACKAGE Sysutils::TMethod __fastcall GetMethodProp(System::TObject* Instance, PPropInfo PropInfo
  219.     );
  220. extern PACKAGE void __fastcall SetMethodProp(System::TObject* Instance, PPropInfo PropInfo, const Sysutils::TMethod 
  221.     &Value);
  222. extern PACKAGE __int64 __fastcall GetInt64Prop(System::TObject* Instance, PPropInfo PropInfo);
  223. extern PACKAGE void __fastcall SetInt64Prop(System::TObject* Instance, PPropInfo PropInfo, const __int64 
  224.     Value);
  225.  
  226. }    /* namespace Typinfo */
  227. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  228. using namespace Typinfo;
  229. #endif
  230. #pragma option pop    // -w-
  231.  
  232. #pragma delphiheader end.
  233. //-- end unit ----------------------------------------------------------------
  234. #endif    // TypInfo
  235.