home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / som / somd / cpp / animal / danimal.idl < prev    next >
Encoding:
Text File  |  1996-01-24  |  2.9 KB  |  102 lines

  1. //
  2. //   COMPONENT_NAME: somx
  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. /* %Z% %I% %W% %G% %U% [%H% %T%] */
  14.  
  15. /*
  16.  *
  17.  * DISCLAIMER OF WARRANTIES.
  18.  * The following [enclosed] code is sample code created by IBM
  19.  * Corporation. This sample code is not part of any standard or IBM
  20.  * product and is provided to you solely for the purpose of assisting
  21.  * you in the development of your applications.  The code is provided
  22.  * "AS IS". IBM MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT
  23.  * NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  24.  * FOR A PARTICULAR PURPOSE, REGARDING THE FUNCTION OR PERFORMANCE OF
  25.  * THIS CODE.  IBM shall not be liable for any damages arising out of
  26.  * your use of the sample code, even if they have been advised of the
  27.  * possibility of such damages.
  28.  *
  29.  * DISTRIBUTION.
  30.  * This sample code can be freely distributed, copied, altered, and
  31.  * incorporated into other software, provided that it bears the above
  32.  * Copyright notice and DISCLAIMER intact.
  33.  */
  34.  
  35.  
  36. #ifndef danimal_idl
  37. #define danimal_idl
  38.  
  39. #include <somobj.idl>
  40.  
  41. interface dLocation;
  42.  
  43. interface dAnimal : SOMObject
  44. {
  45.   attribute string name;
  46.   // Name of animal.
  47.  
  48.   attribute string type;
  49.   // Type of animal.
  50.  
  51.   attribute string food;
  52.   // Food animal likes to eat.
  53.  
  54.   attribute dLocation loc;
  55.   // Object with city and state where animal lives. 
  56.  
  57.   attribute string buff;
  58.   // Work area for display method.
  59.  
  60.   string display();
  61.   // Returns description of animal.
  62.  
  63. #ifdef __SOMIDL__
  64.   implementation {
  65.     releaseorder: _get_name, _set_name, 
  66.                   _get_type, _set_type, 
  67.                   _get_food, _set_food, 
  68.                   _get_loc, _set_loc, 
  69.           _get_buff, _set_buff,
  70.                   display;
  71.  
  72.     //# Class Modifiers
  73.     callstyle = idl;
  74.     dllname = "danimal.dll";
  75.  
  76.     //# Attribute Modifiers
  77.     name: noset;
  78.     type: noset;
  79.     food: noset;
  80.     buff: noset;
  81.  
  82.     //# Method Modifiers
  83.      somDefaultInit: override;
  84.      somDestruct: override;
  85.    //# parameter memory management is per CORBA except as indicated otherwise
  86.        memory_management = corba;
  87.   //# client should free the result of the following methods:
  88.   display: object_owns_result;
  89.   _get_name: object_owns_result;
  90.   _get_type: object_owns_result;
  91.   _get_food: object_owns_result;
  92.   _get_buff: object_owns_result;
  93.   _set_name: caller_owns_parameters = "name";
  94.   _set_type: caller_owns_parameters = "type";
  95.   _set_food: caller_owns_parameters = "food";
  96.   _set_buff: caller_owns_parameters = "buff";
  97.   };
  98. #endif /* __SOMIDL__ */
  99.  
  100. };
  101. #endif  /* danimal_idl */
  102.