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