home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / som / include / constdef.idl < prev    next >
Text File  |  1999-02-22  |  3KB  |  99 lines

  1. //#
  2. //#  COMPONENT_NAME: somi
  3. //#
  4. //#  ORIGINS: 27
  5. //#
  6. //#
  7. //#    25H7912  (C)   COPYRIGHT International Business Machines Corp. 1992,1994,1996,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. //#  @(#) 2.9.1.4 src/somi/ir/somir/constdef.idl, somi.corba, som2.1 1/3/96 14:28:28 [7/30/96 14:46:19]
  14.  
  15.  
  16. //#  ConstantDef: CORBA Interface for constant definitions
  17. //#  See CORBA 1.1, 7.5.9, p.137
  18.  
  19. #ifndef constdef_idl
  20. #define constdef_idl
  21.  
  22. #include <containd.idl>
  23. #include <somcls.idl>
  24.  
  25. interface ConstantDef : Contained
  26. // This interface is used to access information associated with
  27. // constants defined in an IDL file.
  28. //
  29. // See CORBA 1.1, 7.5.9, p.137
  30. {
  31.     struct ConstantDescription {
  32.     Identifier    name;
  33.     RepositoryId  id;
  34.     RepositoryId  defined_in;
  35.     TypeCode      type;
  36.     any          value;
  37.     };
  38.     // The inherited describe method returns an instance of this
  39.     // (ConstantDescription) structure in the "value" member of the
  40.     // Description structure defined in the Contained interface.
  41.  
  42.     attribute TypeCode type;
  43.     // The TypeCode of the receiving object.  The memory used to hold
  44.     // the TypeCode is contained in the receiving object, which retains
  45.     // ownership.  Hence, do not free the returned TypeCode.  If you want
  46.     // to obtain a separate copy, use the TypeCode_copy operation.
  47.  
  48.     attribute any value;
  49.     // The value of the receiving constant object;
  50.     // "value" is an any carrying a string per CORBA 7.5.9 p. 123
  51. #ifdef __SOMIDL__
  52.   implementation {
  53.       releaseorder: _get_type,_set_type,_get_value,_set_value
  54.       ;
  55.  
  56.       //# Class Modifiers
  57.       callstyle = idl;
  58.       majorversion = 2;
  59.       minorversion = 3;
  60.       filestem = constdef;
  61.       dllname = "somir.dll";
  62.  
  63.       passthru C_h =
  64.     ""
  65.     "    #include <somtcnst.h>"
  66.     "    #include <somir.h>"
  67.     "    #include <containd.h>"
  68.     "";
  69.       passthru C_xh =
  70.     ""
  71.     "    #include <somtcnst.xh>"
  72.     "    #include <somir.xh>"
  73.     "    #include <containd.xh>"
  74.     "";
  75.  
  76.       //# Attribute Modifiers
  77.       type: nodata;
  78.       value: nodata;
  79. #if defined __SOM_KERNEL_LEVEL && __SOM_KERNEL_LEVEL >= 250
  80.       _get_type : dual_owned_result;
  81.       _get_value: dual_owned_result;
  82. #else
  83.       _set_type : caller_owns_parameters = "type";
  84.       _set_value: caller_owns_parameters = "value";
  85. #endif
  86.  
  87.       //# Method Modifiers
  88.       somDefaultInit: override, init;
  89.       somDestruct: override;
  90.       somDumpSelf: override;
  91.       somDumpSelfInt: override;
  92.       describe: override;
  93.  
  94.   };
  95. #endif /* __SOMIDL__ */
  96. };
  97.  
  98. #endif    /* constdef_idl */
  99.