home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / progs / CB / DATA.Z / TYPINFO.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-06  |  4.6 KB  |  164 lines

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