home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / som30tk.zip / som30os2.zip / include / scentry.idl < prev    next >
Text File  |  1996-12-24  |  6KB  |  179 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/scentry.idl 2.11 5/9/96 15:31:08 [12/24/96 07:39:46]
  14.  
  15.  
  16. #ifndef scentry_idl
  17. #define scentry_idl
  18.  
  19. #include <somobj.idl>
  20. #include "sctypes.h"
  21.  
  22. interface SOMTEntryC : SOMObject
  23.  
  24. // A SOM class interface definition is compiled to produce a graph
  25. // structure whose nodes are instances of <SOMTEntry> or its
  26. // sub-classes.  Each entry is derived from some syntactic element of
  27. // the definition source. The attributes defined in <SOMTEntryC>
  28. // refer to this syntactic element in a fairly obvious way.
  29. //
  30.  
  31. {
  32.   attribute string somtEntryName;
  33.   // The name associated with this entry.  Eg, the name of
  34.   // the data item, the class, the method, the type, etc.
  35.  
  36.   attribute SOMTTypes somtElementType;
  37.   // Returns the type of this entry.
  38.   // This is not datatype, but entry type (method, class, 
  39.   // passthru, etc.). The value is defined by SOMTTypes.
  40.  
  41.   readonly attribute string somtElementTypeName;
  42.   // String version of somtElementType.
  43.  
  44.   readonly attribute string somtEntryComment;
  45.   // Returns the comment associated with this entry, or NULL is this
  46.   // entry has no associated comment.  Comments will have comment
  47.   // delimitors removed, but will retain newline characters as
  48.   // specified in the source file. (use smLookupComment)
  49.  
  50.   readonly attribute unsigned long somtSourceLineNumber;
  51.   // Returns the line number in the source file where this entry's
  52.   // syntactic form ended.
  53.  
  54.   readonly attribute TypeCode somtTypeCode;
  55.   // The typecode, if appropriate, or NULL.
  56.  
  57.   readonly attribute boolean somtIsReference;
  58.   // Whether the entry is just a reference to the real type (TRUE) 
  59.   // rather than a declaration of it (FALSE).
  60.  
  61.   readonly attribute string somtIDLScopedName;
  62.   // The IDL scoped name of the entry (using double colon as delimiter).
  63.  
  64.   readonly attribute string somtCScopedName;
  65.   // The C scoped name of the entry (using underscore as delimiter).
  66.  
  67.   string somtGetModifierValue(in string modifierName);
  68.   
  69.   // Returns the value of the named modifier if this entry has the
  70.   // named modifier and NULL otherwise. Note: if the modifier is
  71.   // present but does not have a value then a value of <'\1'> is
  72.   // returned.
  73.  
  74.   boolean somtGetFirstModifier(inout string modifierName, 
  75.                          inout string modifierValue);
  76.   
  77.   // Returns the first modifier associated with this entry.  1 (true)
  78.   // is returned if the entry has at least one modifier and 0 (false)
  79.   // otherwise.
  80.  
  81.   boolean somtGetNextModifier(inout string modifierName, 
  82.                         inout string modifierValue);
  83.   
  84.   // Returns the next modifier (with respect to the last call to
  85.   // <somtGetNextModifier> or <somtGetFirstModifier>)
  86.   // associated with this entry.  1 (true) is returned if the entry
  87.   // had another modifier and 0 (false) otherwise.
  88.  
  89.   long somtFormatModifier(in string buffer, 
  90.                        in string name, 
  91.                        in string value);
  92.   
  93.   // Formats the indicated name/value pair into buffer.  Buffer must
  94.   // be big enough to hold all the formatted pair, no checks are made.
  95.   // The number of characters added to buffer are returned (not
  96.   // including the trailing null character).
  97.   // Note: value may be null
  98.   // You will probably never call this method, it is provided so that
  99.   // you can override it to control the format returned in
  100.   // <somtGetModifierList>.
  101.  
  102.   long somtGetModifierList(in string buffer);
  103.   
  104.   // The modifiers for this entry are placed in <buffer> in template
  105.   // list form (newline separated).  Buffer must be big enough to
  106.   // hold all the modifiers, no checks are made. The number of
  107.   // modifiers is returned.
  108.  
  109.   long somtSetSymbolsOnEntry(in SOMTEmitC emitter, 
  110.                           in string prefix);
  111.   
  112.   // Places a number of symbol/value pairs in <t>.  All the symbols
  113.   // will begin with <prefix>.
  114.  
  115.   void somtSetEntryStruct(inout Entry es);
  116.   
  117.   // Sets the entry struct data member.
  118.   // Note, when overridding this method, it is important to call the
  119.   // parent version of the method first and then do your processing.
  120.  
  121.  
  122. #ifdef __SOMIDL__
  123.   implementation {
  124.   
  125.     releaseorder: _get_somtEntryName, _set_somtEntryName, 
  126.                   _get_somtElementType, _set_somtElementType, 
  127.                   _get_somtEntryComment, _get_somtSourceLineNumber, 
  128.                   _get_somtTypeCode, _get_somtIsReference, 
  129.                   somtGetModifierValue, somtGetFirstModifier, 
  130.                   somtGetNextModifier, somtFormatModifier, 
  131.                   somtGetModifierList, somtSetSymbolsOnEntry, 
  132.                   somtSetEntryStruct, _get_somtEntryStruct, 
  133.                   somtShowAssocEntry, _get_somtCScopedName, 
  134.                   _get_somtIDLScopedName, _get_somtElementTypeName;
  135.  
  136.  
  137.     //# Class Modifiers
  138.     majorversion = 2;
  139.     minorversion = 1;
  140.     filestem = scentry;
  141. #ifdef _WIN32
  142.     dllname = "some.dll";
  143. #endif
  144.     callstyle = oidl;
  145.   
  146.     passthru C_h_after =        "#include <sctypes.h>"
  147.   "#include <scemit.h>"
  148.   "#include <sctmplt.h>";
  149.     passthru C_xh_after =        "#include <sctypes.h>"
  150.   "#include <sctmplt.xh>";
  151.   
  152.   
  153.     //# Internal Instance Variables
  154.   
  155.     //# Method Modifiers
  156.     somInit: override;
  157.     somUninit: override;
  158.     somPrintSelf: override;
  159.     somDumpSelfInt: override;
  160.     somDumpSelf: override;
  161.   
  162.     //# Attribute Modifiers
  163.     somtEntryComment: nodata;
  164.     somtCScopedName: nodata;
  165.     somtIDLScopedName: nodata;
  166.     somtSourceLineNumber: nodata;
  167.     somtTypeCode: nodata;
  168.     somtIsReference: nodata;
  169.     somtEntryStruct: nodata;
  170.     somtElementTypeName: nodata;
  171.     somtEntryName: noget;
  172.   
  173.   };
  174. #endif /* __SOMIDL__ */
  175. };
  176.  
  177.  
  178. #endif  /* scentry_idl */
  179.