home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / som30tk.zip / som30os2.zip / include / scmethod.idl < prev    next >
Text File  |  1996-12-24  |  7KB  |  186 lines

  1. //
  2. //   COMPONENT_NAME: some
  3. //
  4. //   ORIGINS: 27
  5. //
  6. //
  7. //    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996 
  8. //   All Rights Reserved
  9. //   Licensed Materials - Property of IBM
  10. //   US Government Users Restricted Rights - Use, duplication or
  11. //   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  12. //
  13. //#  @(#) somc/scmethod.idl 2.8 5/9/96 15:31:16 [12/24/96 07:39:48]
  14.  
  15.  
  16. #ifndef scmethod_idl
  17. #define scmethod_idl
  18.  
  19. #include <sccommon.idl>
  20. interface SOMTClassEntryC;
  21. interface SOMTParameterEntryC;
  22. interface SOMTDataEntryC;
  23. interface SOMTStructEntryC;
  24.  
  25. interface SOMTMethodEntryC : SOMTCommonEntryC
  26. {
  27.   readonly attribute boolean somtIsVarargs;
  28.   // Returns 1 (true) if this method definition has a variable length
  29.   // parameter list.
  30.  
  31.   readonly attribute SOMTMethodEntryC somtOriginalMethod;
  32.   // If this is an override method definition (<SOMTOverrideMethodE>)
  33.   // then this is the method definition entry that orginially
  34.   // introduced the method.
  35.  
  36.   readonly attribute SOMTClassEntryC somtOriginalClass;
  37.   // If this is an override method definition (<SOMTOverrideMethodE>)
  38.   // then this is the class definition entry that orginially
  39.   // introduced the method.
  40.  
  41.   readonly attribute SOMTEntryC somtMethodGroup;
  42.   // The group this method is defined in within a class definition.
  43.  
  44.   readonly attribute boolean somtIsPrivateMethod;
  45.   // Whether or not the method is private.
  46.  
  47.   readonly attribute boolean somtIsOneway;
  48.   // Whether or not the method is oneway.
  49.  
  50.   readonly attribute short somtArgCount;
  51.   // The number of arguments for the method.
  52.  
  53.   SOMTParameterEntryC somtGetFirstParameter();
  54.   
  55.   // Returns the first formal parameter entry for this method if it
  56.   // has one and NULL otherwise.  Note: the target object parameter is
  57.   // not included, therefore the first parameter is really the second
  58.   // parameter from a SOM runtime perspective.
  59.  
  60.   SOMTParameterEntryC somtGetNextParameter();
  61.   
  62.   // Returns the next formal parameter entry for this method if it has
  63.   // one and NULL otherwise.
  64.  
  65.   string somtGetIDLParamList(in string buffer);
  66.   // Returns the formal parameter list (in IDL syntax) for this method.
  67.   // The parameter list is built in <buffer> and the address of <buffer>
  68.   // is returned.
  69.   // Parameters are delimited with newlines.
  70.   // The method receiver and any implicit method arguments are NOT included.
  71.  
  72.   string somtGetShortCParamList(in string buffer, 
  73.                       in string selfParm, 
  74.                       in string varargsParm);
  75.   
  76.   // Returns the formal parameter list (in ANSI C function prototype
  77.   // form, with types) for this method. The parameter list is built in 
  78.   // <buffer> and the address of <buffer> is returned.
  79.   // Parameters are delimited with newlines.
  80.   // If this method takes a variable number of arguments then the
  81.   // final parameter substring is replaced by <varargsParm>, unless
  82.   // <varargsParm> is NULL in which case the final parameter is
  83.   // removed.
  84.   // If <selfParm> is not null then it is added as an initial
  85.   // parameter. (The <selfParm> string may actually contain multiple
  86.   // parameters, delimited by newline characters.)
  87.   // The method receiver and any implicit method arguments are NOT
  88.   // included.
  89.   // The types of the method parameters are given in C form (with pointer
  90.   // stars, where needed) rather than in the IDL form.
  91.  
  92.   string somtGetFullCParamList(in string buffer, in string varargsParm);
  93.   // Same as somtGetShortCParamList except that the method receiver and
  94.   // any implicit method arguments (Environment and Context) are included.
  95.   // The types of the method parameters are given in C form (with pointer
  96.   // stars, where needed) rather than in the IDL form.
  97.  
  98.   string somtGetShortParamNameList(in string buffer, 
  99.                        in string selfParm, 
  100.                        in string varargsParm);
  101.   
  102.   // Returns the parameter list for this method in call form (without
  103.   // types). The argument list is built in <buffer> and the address of 
  104.   // <buffer> is returned. Parameters are delimited with newlines.
  105.   // If this method takes a variable number of arguments then the
  106.   // final parameter is replaced by <varargsParm>, unless
  107.   // <varargsParm> is NULL in which case the final parameter is removed.
  108.   // If <selfParm> is not null then it is added as an initial
  109.   // parameter. (The <selfParm> string may actually contain multiple
  110.   // parameters, delimited by newline characters.)
  111.   // The method receiver and any implicit method arguments are NOT
  112.   // included.
  113.  
  114.   string somtGetFullParamNameList(in string buffer, in string varargsParm);
  115.   // Same as somtGetParamNameList except that the method receiver and
  116.   // any implicit method arguments (Environment and Context) are included.
  117.  
  118.   SOMTParameterEntryC somtGetNthParameter(in short n);
  119.   // Returns the object representing the nth explicit method parameter.
  120.  
  121.   SOMTStructEntryC somtGetFirstException();
  122.   // The first exception this method raises.
  123.   SOMTStructEntryC somtGetNextException();
  124.  // The next exception this method raises,
  125.  // relative to the previous call to this method or to
  126.  // somtGetFirstException.
  127.  
  128.   readonly attribute string *somtContextArray;
  129.   // An array of the context string-literals for the method.
  130.  
  131.   readonly attribute string somtCReturnType;
  132.   // The C datatype the method returns. This may not correspond to the
  133.   // IDL data type (in particular, pointer stars may be added).
  134.  
  135. #ifdef __SOMIDL__
  136.   implementation {
  137.  
  138.     releaseorder: _get_somtIsVarargs, _get_somtOriginalMethod, 
  139.                   _get_somtOriginalClass, _get_somtMethodGroup, 
  140.                   somtGetFirstParameter, somtGetNextParameter, 
  141.                   somtGetArgList, somtGetParmList, 
  142.                   _get_somtIsPrivateMethod, _get_somtIsOneway, 
  143.                   _get_somtArgCount, somtGetFirstException, 
  144.                   somtGetNextException, _get_somtContextArray, 
  145.                   somtGetShortCPrototype, somtGetFullCPrototype, 
  146.                   somtGetShortParmList, somtGetFullParmList, 
  147.                   somtGetNthParameter, _get_somtCReturnType, 
  148.                   somtGetIDLParamList, somtGetShortCParamList, 
  149.                   somtGetFullCParamList, somtGetShortParamNameList, 
  150.                   somtGetFullParamNameList;
  151.  
  152.  
  153.     //# Class Modifiers
  154.     majorversion = 2;
  155.     minorversion = 1;
  156.     filestem = scmethod;
  157. #ifdef _WIN32
  158.     dllname = "some.dll";
  159. #endif
  160.     callstyle = oidl; 
  161.   
  162.     //# Internal Instance Variables
  163.     SOMTParameterEntryC nextParameter;     
  164.   
  165.     //# Method Modifiers
  166.     somtSetSymbolsOnEntry: override;
  167.     somDumpSelfInt: override;
  168.   
  169.     //# Attribute Modifiers
  170.     somtIsVarargs: nodata;
  171.     somtOriginalClass: nodata;
  172.     somtOriginalMethod: nodata;
  173.     somtMethodGroup: nodata;
  174.     somtIsPrivateMethod: nodata;
  175.     somtIsOneway: nodata;
  176.     somtArgCount: nodata;
  177.     somtContextArray: nodata;
  178.     somtCReturnType: nodata;
  179.   
  180.   };
  181. #endif /* __SOMIDL__ */
  182. };
  183.  
  184.  
  185. #endif  /* scmethod_idl */
  186.