home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / VPR_DATA / PROGRAM / CBTRIAL / SETUP / DATA.Z / TYPINFO.HPP < prev    next >
C/C++ Source or Header  |  1997-02-14  |  5KB  |  171 lines

  1. //----------------------------------------------------------------------------
  2. // TypInfo.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
  3. // From: TypInfo.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef TypInfoHPP
  6. #define TypInfoHPP
  7. //----------------------------------------------------------------------------
  8. #include <SysUtils.hpp>
  9. #include <System.hpp>
  10. #pragma warn -par
  11. #pragma warn -hid 
  12. #pragma warn -inl
  13.  
  14. namespace Typinfo
  15. {
  16. //-- type declarations -------------------------------------------------------
  17. enum TTypeKind { tkUnknown, tkInteger, tkChar, tkEnumeration, tkFloat, tkString, tkSet, tkClass, tkMethod, 
  18.     tkWChar, tkLString, tkLWString, tkVariant };
  19.  
  20. typedef Set<TTypeKind, tkUnknown, tkVariant>  TTypeKinds;
  21.  
  22. enum TOrdType { otSByte, otUByte, otSWord, otUWord, otSLong };
  23.  
  24. enum TFloatType { ftSingle, ftDouble, ftExtended, ftComp, ftCurr };
  25.  
  26. enum TMethodKind { mkProcedure, mkFunction };
  27.  
  28. enum TypInfo_1 { pfVar, pfConst, pfArray, pfAddress, pfReference };
  29.  
  30. typedef Set<TypInfo_1, pfVar, pfReference>  TParamFlags;
  31.  
  32. struct TTypeInfo;
  33. typedef TTypeInfo *PTypeInfo;
  34.  
  35. #pragma pack(push, 1)
  36. struct TTypeInfo
  37. {
  38.     TTypeKind Kind;
  39.     System::ShortString Name;
  40. } ;
  41. #pragma pack(pop)
  42.  
  43. struct TTypeData;
  44. typedef TTypeData *PTypeData;
  45.  
  46. #pragma pack(push, 1)
  47. struct TTypeData
  48. {
  49.     
  50.     union
  51.     {
  52.         struct 
  53.         {
  54.             TMethodKind MethodKind;
  55.             Byte ParamCount;
  56.             char ParamList[1024];
  57.             
  58.         };
  59.         struct 
  60.         {
  61.             System::TMetaClass*ClassType;
  62.             TTypeInfo *ParentInfo;
  63.             short PropCount;
  64.             System::DummyShortString UnitName;
  65.             
  66.         };
  67.         Byte MaxLength;
  68.         TFloatType FloatType;
  69.         TOrdType OrdType;
  70.         union
  71.         {
  72.             TTypeInfo *CompType;
  73.             struct 
  74.             {
  75.                 long MinValue;
  76.                 long MaxValue;
  77.                 union
  78.                 {
  79.                     struct 
  80.                     {
  81.                         TTypeInfo *BaseType;
  82.                         System::DummyShortString NameList;
  83.                         
  84.                     };
  85.                     
  86.                 };
  87.             };
  88.             
  89.         };
  90.     };
  91. } ;
  92. #pragma pack(pop)
  93.  
  94. #pragma pack(push, 1)
  95. struct TypInfo_2
  96. {
  97.     
  98. } ;
  99. #pragma pack(pop)
  100.  
  101. #pragma pack(push, 1)
  102. struct TPropData
  103. {
  104.     Word PropCount;
  105.     TypInfo_2 PropList;
  106. } ;
  107. #pragma pack(pop)
  108.  
  109. struct TPropInfo;
  110. typedef TPropInfo *PPropInfo;
  111.  
  112. #pragma pack(push, 1)
  113. struct TPropInfo
  114. {
  115.     TTypeInfo *PropType;
  116.     void *GetProc;
  117.     void *SetProc;
  118.     void *StoredProc;
  119.     int Index;
  120.     long Default;
  121.     short NameIndex;
  122.     System::ShortString Name;
  123. } ;
  124. #pragma pack(pop)
  125.  
  126. typedef void __fastcall (__closure *TPropInfoProc)(PPropInfo PropInfo);
  127.  
  128. typedef TPropInfo *TPropList[16380];
  129.  
  130. typedef TPropList *PPropList;
  131.  
  132. //-- var, const, procedure ---------------------------------------------------
  133. #define tkAny 0x1FFF
  134. #define tkMethods 0x1
  135. #define tkProperties 0x1EFE
  136. extern PTypeData __fastcall GetTypeData(PTypeInfo TypeInfo);
  137. extern System::AnsiString __fastcall GetEnumName(PTypeInfo TypeInfo, int Value);
  138. extern int __fastcall GetEnumValue(PTypeInfo TypeInfo, const System::AnsiString Name);
  139. extern PPropInfo __fastcall GetPropInfo(PTypeInfo TypeInfo, const System::AnsiString PropName);
  140. extern void __fastcall GetPropInfos(PTypeInfo TypeInfo, PPropList PropList);
  141. extern int __fastcall GetPropList(PTypeInfo TypeInfo, TTypeKinds TypeKinds, PPropList PropList);
  142. extern bool __fastcall IsStoredProp(System::TObject* Instance, PPropInfo PropInfo);
  143. extern long __fastcall GetOrdProp(System::TObject* Instance, PPropInfo PropInfo);
  144. extern void __fastcall SetOrdProp(System::TObject* Instance, PPropInfo PropInfo, long Value);
  145. extern System::AnsiString __fastcall GetStrProp(System::TObject* Instance, PPropInfo PropInfo);
  146. extern void __fastcall SetStrProp(System::TObject* Instance, PPropInfo PropInfo, const System::AnsiString 
  147.     Value);
  148. extern Extended __fastcall GetFloatProp(System::TObject* Instance, PPropInfo PropInfo);
  149. extern void __fastcall SetFloatProp(System::TObject* Instance, PPropInfo PropInfo, Extended Value);
  150. extern System::Variant __fastcall GetVariantProp(System::TObject* Instance, PPropInfo PropInfo);
  151. extern void __fastcall SetVariantProp(System::TObject* Instance, PPropInfo PropInfo, const System::Variant 
  152.     &Value);
  153. extern Sysutils::TMethod __fastcall GetMethodProp(System::TObject* Instance, PPropInfo PropInfo);
  154. extern void __fastcall SetMethodProp(System::TObject* Instance, PPropInfo PropInfo, const Sysutils::TMethod 
  155.     &Value);
  156. //-- template instantiations -------------------------------------------------
  157. template class TParamFlags ;
  158. template class TTypeKinds ;
  159.  
  160. }    /* namespace Typinfo */
  161.  
  162. #pragma warn .par
  163. #pragma warn .hid 
  164. #pragma warn .inl
  165.  
  166. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  167. using namespace Typinfo;
  168. #endif
  169. //-- end unit ----------------------------------------------------------------
  170. #endif    // TypInfo
  171.