home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / toolkt21 / cplus / os2h / somtypes.xh < prev    next >
Encoding:
Text File  |  1993-04-30  |  2.2 KB  |  114 lines

  1. /*
  2.  *    SOMTYPES.H
  3.  *    System Object Model typedefs
  4.  *
  5.  *    Copyright (c) International Business Machines Corporation
  6.  *                  1991, 1992
  7.  *
  8.  *    @(#)somtypes.xh 1.1 5/13/92 12:55:21 [5/14/92] (c)IBM Corp. 1992
  9.  */
  10.  
  11. /* SOM types for C++ */
  12.  
  13. #ifndef somtypes_xh
  14. #define somtypes_xh
  15. /*#include <sombtypes.h> shorten to 8 characters */
  16. #include <sombtype.h>
  17.  
  18. /* Primitive Classes */
  19. class SOMObject;
  20. class SOMClass;
  21. class SOMClassMgr;
  22.  
  23.  
  24. /* somMethodProc */
  25. #ifdef __IBMC__
  26.   #pragma linkage( somMethodProc, system )
  27. #endif
  28. typedef integer4 SOMLINK somMethodProc(void);
  29.  
  30.  
  31. /*   Method Descriptor  */
  32. typedef struct somMethodDataStruct {
  33.     somId id;
  34.     uinteger4 type;                    /* 0=static, 1=dynamic */
  35.     somId descriptor;
  36.     somMToken offset;                  /* not valid for dynamic methods */
  37.     somMethodProc *method;
  38.     somMethodProc *redispatchStub;
  39.     somMethodProc *applyStub;
  40. } somMethodData;
  41.  
  42.  
  43. /* Method Table  */
  44. typedef struct somMethodTabStruct {
  45.     SOMClass *classObject;
  46.     somMethodProc *entries[1];
  47. } somMethodTab;
  48.  
  49.  
  50. /*  SOM Object Instance */
  51. typedef struct SOMAny_struct {
  52.     struct somMethodTabStruct *mtab;
  53.     integer1 body[1];
  54. } SOMAny;
  55.  
  56.  
  57. /*
  58.  *    Old style name support
  59.  */
  60.  
  61. typedef somMethodProc *somMethodPtr;
  62.  
  63. /* The following synonyms provide OS/2-style typedefs */
  64.  
  65. #ifndef FLOAT4
  66. #define FLOAT4                  float4
  67. #endif
  68.  
  69. #ifndef FLOAT8
  70. #define FLOAT8                  double
  71. #endif
  72.  
  73. #ifndef SOMID
  74. #define SOMID                   somId
  75. #endif
  76.  
  77. #ifndef SOMTOKEN
  78. #define SOMTOKEN                somToken
  79. #endif
  80.  
  81. #ifndef SOMANY
  82. #define SOMANY                  SOMAny
  83. #endif
  84.  
  85. #ifndef SOMCLASS
  86. #define SOMCLASS                SOMClass
  87. #endif
  88.  
  89. #ifndef SOMOBJECT
  90. #define SOMOBJECT               SOMObject
  91. #endif
  92.  
  93. #ifndef SOMMETHODTAB
  94. #define SOMMETHODTAB            somMethodTab
  95. #endif
  96.  
  97. #ifndef SOMMETHODDATA
  98. #define SOMMETHODDATA           somMethodData
  99. #endif
  100.  
  101. #ifndef SOMMETHODPTR
  102. #define SOMMETHODPTR            somMethodPtr
  103. #endif
  104.  
  105. #ifndef SOMTRAITANY
  106. #define SOMTRAITANY             SOMTraitAny
  107. #endif
  108.  
  109. #ifndef SOMCLASSDATASTRUCT
  110. #define SOMCLASSDATASTRUCT      somClassDataStructure
  111. #endif
  112.  
  113. #endif  /* somtypes_h */
  114.