//
//   COMPONENT_NAME: some
//
//   ORIGINS: 27
//
//
//    25H7912  (C)  COPYRIGHT International Business Machines Corp. 1992,1994,1996 
//   All Rights Reserved
//   Licensed Materials - Property of IBM
//   US Government Users Restricted Rights - Use, duplication or
//   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
//
//#  @(#) somc/sccommon.idl 2.9 5/9/96 15:31:01 [12/22/96 21:12:04]

#ifndef sccommon_idl
#define sccommon_idl

#include <scentry.idl>
interface SOMTTypedefEntryC;

enum somtVisibilityT { somtInternalVE, somtPublicVE, somtPrivateVE };
interface SOMTCommonEntryC : SOMTEntryC

// This class defines a number of methods and attributes that are
// common to <SOMTMethodEntry>, <SOMTDataEntry>, and
// <SOMTParameterEntry>.  No entries of this type will actually
// be found in the entry graph, instead they will all be one of
// the types mentioned above.
// Exception: entries whose somtElementType is SOMTTypedefBE, which
// represent a reference to a user-defined type, are instance of this class.

{

  readonly attribute SOMTEntryC somtTypeObj;

  // The object representing the base type of the entry.
  // This does not include pointer stars or array declarators.

  readonly attribute string somtPtrs;

  // The string of stars associated with the entry's type.
  // For example, an object of type "foo" would have somtPtrs = NULL,
  // type "foo *" would have somtPtrs = "*", type
  // "foo **" would have somtPtrs = "**", etc.

  readonly attribute string somtArrayDimsString;

  // Array dimensions in string form.

  unsigned long somtGetFirstArrayDimension();
  // The first array dimension, for items of type array.
  // Zero indicates that the item is not an array.

  unsigned long somtGetNextArrayDimension();
  // The next array dimension, for items of type array,
  // relative to the previous call to this method or to
  // somtGetFirstArrayDimension.  Zero indicates no more dimensions.

  readonly attribute string somtSourceText;
  
  // The un-parsed source text for this entry, with leading and
  // trailing white space removed.  For attribute/typedef declarators
  // and for user-defined types, this attribute only provides the
  // source text for the entry's name.  For methods, arguments, 
  // and instance variables, however, this attribute provides the 
  // full definition.

  readonly attribute string somtType;
  
  // The IDL type for this entry in string form. For methods this is the
  // return type.  For data or parameters this is the type of the data
  // item or parameter. For user-defined types, this is the type specification.
  // It is of the form:   <typename><pointer-stars> <array-declarators>

  readonly attribute somtVisibilityT somtVisibility;
  
  // The visibility of this entry.  Note: the visibility of
  // parameter entries will always be public, and methods can never be
  // internal.

  boolean somtIsArray(out long size);
  
  // Returns 1 (true) if the type involves an array.  When the type
  // involves an array then <size> is set to be the size of the
  // array.

  boolean somtIsPointer();
  
  // Returns 1 (true) if the type involves a pointer, and 0 (false)
  // otherwise

 

#ifdef __SOMIDL__
  implementation {
    releaseorder: _get_somtSourceText, _get_somtType, 
                  _get_somtVisibility, somtIsArray, 
                  somtIsPointer, somtIsArrayDominant, 
                  _get_somtTypeObj, _get_somtPtrs, 
                  _get_somtArrayDimsString, somtGetFirstArrayDimension, 
                  somtGetNextArrayDimension;


    //# Class Modifiers
    majorversion = 2;
    minorversion = 1;
    filestem = sccommon;
#ifdef _WIN32
    dllname = "some.dll";
#endif
    callstyle = oidl;

    passthru C_h = "typedef enum somtVisibilityT { somtInternalVE, somtPublicVE, somtPrivateVE } somtVisibilityT;";
    passthru C_xh = "typedef enum somtVisibilityT { somtInternalVE, somtPublicVE, somtPrivateVE } somtVisibilityT;";
  
    //# Method Modifiers
    somDumpSelfInt: override;
    somtSetSymbolsOnEntry: override;
  
    //# Attribute Modifiers
    somtTypeObj: nodata;
    somtPtrs: nodata;
    somtArrayDimsString: nodata;
    somtType: nodata;
    somtVisibility: nodata;


  };
#endif /* __SOMIDL__ */
};
#endif  /* sccommon_idl */
