home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / scmethod.idl < prev    next >
Encoding:
Text File  |  1996-02-21  |  6.8 KB  |  175 lines

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