home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / include / implrep.idl < prev    next >
Encoding:
Text File  |  1996-02-21  |  5.4 KB  |  169 lines

  1. //
  2. //   COMPONENT_NAME: somd
  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. //  CLASS SPECIFICATION FOR IMPLEMENTATION REPOSITORY
  15.  
  16.  
  17. #ifndef implrep_idl
  18. #define implrep_idl
  19.  
  20. #include <somobj.idl>
  21. #include <somdtype.idl>
  22. #include <snglicls.idl>
  23.  
  24.  
  25. interface ImplementationDef;
  26.  
  27. interface ImplRepository : SOMObject
  28. {
  29.   ImplementationDef find_impldef(in ImplId implid);
  30.  
  31.   // This method searches the Implementation Repository and returns
  32.   // an ImplementationDef object with the specified implid.
  33.  
  34.   ImplementationDef find_impldef_by_alias(in string alias_name);
  35.  
  36.   // This method searches the Implementation Repository and returns
  37.   // an ImplementationDef object with the specified name (alias).
  38.  
  39.   ORBStatus find_all_impldefs(out sequence<ImplementationDef> outimpldefs);
  40.  
  41.    // This method searches the Implementation Repository and returns
  42.    // all the ImplementationDef objects in it.
  43.  
  44.   sequence<ImplementationDef> find_impldef_by_class(in string classname);
  45.  
  46.   // This method searches the class index and returns the sequence of
  47.   // ImplementationDef objects for servers which implement that class.
  48.  
  49.   void add_impldef(in ImplementationDef impldef);
  50.  
  51.   // This method inserts an ImplementationDef object into the Implementation
  52.   // Repository.
  53.  
  54.   void update_impldef(in ImplementationDef impldef);
  55.  
  56.   // This method replaces an ImplementationDef object in the Implementation
  57.   // Repository with the supplied object.  The "impl_id" attribute of the
  58.   // supplied object is used to find the object to replace in the Impl.
  59.   // Repository.
  60.  
  61.   void delete_impldef(in ImplId implid);
  62.  
  63.   // This method deletes the ImplementationDef object with the specified
  64.   // implid from the Implementation Repository.
  65.  
  66.   void add_class_to_impldef(in ImplId implid, in string classname);
  67.  
  68.   // This method associates the classname with the ImplementationDef
  69.   // whose id is "implid".  This is meant to indicate that the server
  70.   // (specified by the ImplementationDef) implements the named class.
  71.  
  72.   void remove_class_from_impldef(in ImplId implid, in string classname);
  73.  
  74.   // This method removes the classname from the list of classnames
  75.   // associated with the ImplementationDef whose id is "implid".
  76.  
  77.   void remove_class_from_all(in string classname);
  78.  
  79.   // This method removes the classname from all the ImplementationDefs.
  80.  
  81.   sequence<string> find_classes_by_impldef(in ImplId implid);
  82.  
  83.   // This method searches the class index and returns the sequence of
  84.   // class names supported by a server with specified "implid".
  85.  
  86.  
  87. #ifdef __SOMIDL__
  88.  
  89.   implementation
  90.   {
  91.     releaseorder: find_impldef, find_impldef_by_alias,
  92.                   find_impldef2, find_impldef_by_alias2,
  93.                   find_impldef_by_class, add_impldef,
  94.                   update_impldef, delete_impldef,
  95.                   add_class_to_impldef,
  96.                   remove_class_from_impldef, remove_class_from_all,
  97.                   find_classes_by_impldef,
  98.                   implr_get_impl, implr_search_impl,
  99.                   implr_search_class, implr_update_impl,
  100.                   find_all_impldefs;
  101.  
  102.     callstyle = idl;
  103.     metaclass = SOMMSingleInstance;
  104.     dllname = "somd.dll";
  105.     majorversion = 2;
  106.     minorversion = 1;
  107.  
  108.     somInit: override;
  109.     somUninit: override;
  110.  
  111.     passthru C_h_after = ""
  112.       "#include <impldef.h>"
  113.       ""
  114.       "#ifdef SOM_STRICT_IDL"
  115. #if defined(_WIN16)
  116.       "#define SOMD_ImplRepObject (*SOMD_ImplRepObjectResolve())"
  117.       "SOMEXTERN ImplRepository * SOMLINK SOMD_ImplRepObjectResolve(void);"
  118. #elif defined (_WIN32)
  119.       "SOMEXTERN WIN32_DLLIMPORT ImplRepository   SOMDLINK SOMD_ImplRepObject;"
  120. #else
  121.       "SOMEXTERN ImplRepository   SOMDLINK SOMD_ImplRepObject;"
  122. #endif
  123.       "#else"
  124. #if defined(_WIN16)
  125.       "#define SOMD_ImplRepObject (*SOMD_ImplRepObjectResolve())"
  126.       "SOMEXTERN ImplRepository ** SOMLINK SOMD_ImplRepObjectResolve(void);"
  127. #elif defined (_WIN32)
  128.       "SOMEXTERN WIN32_DLLIMPORT ImplRepository * SOMDLINK SOMD_ImplRepObject;"
  129. #else
  130.       "SOMEXTERN ImplRepository * SOMDLINK SOMD_ImplRepObject;"
  131. #endif
  132.       "#endif /* SOM_STRICT_IDL */"
  133.       "";
  134.  
  135.     passthru C_xh_after = ""
  136.       "class ImplRepository;"
  137.       "#include <impldef.xh>"
  138.       ""
  139. #if defined(_WIN16)
  140.       "#define SOMD_ImplRepObject (*SOMD_ImplRepObjectResolve())"
  141.       "SOMEXTERN ImplRepository ** SOMLINK SOMD_ImplRepObjectResolve(void);"
  142. #elif defined (_WIN32)
  143.       "SOMEXTERN WIN32_DLLIMPORT ImplRepository * SOMDLINK SOMD_ImplRepObject;"
  144. #else
  145.       "SOMEXTERN ImplRepository * SOMDLINK SOMD_ImplRepObject;"
  146. #endif
  147.       "";
  148.  
  149.     passthru C_hh_after = ""
  150.       "class ImplRepository;"
  151.       "#include <impldef.hh>"
  152.       ""
  153. #if defined(_WIN16)
  154.       "#define SOMD_ImplRepObject (*SOMD_ImplRepObjectResolve())"
  155.       "SOMEXTERN ImplRepository ** SOMLINK SOMD_ImplRepObjectResolve(void);"
  156. #elif defined (_WIN32)
  157.       "SOMEXTERN WIN32_DLLIMPORT ImplRepository * SOMDLINK SOMD_ImplRepObject;"
  158. #else
  159.       "SOMEXTERN ImplRepository * SOMDLINK SOMD_ImplRepObject;"
  160. #endif
  161.       "";
  162.  
  163.   };
  164.  
  165. #endif /* __SOMIDL__ */
  166. };
  167.  
  168. #endif  /* implrep_idl */
  169.