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

  1. #ifndef spersist_idl
  2. #define spersist_idl
  3.  
  4. /***********************************************
  5.  
  6.     Licensed Materials - Property of IBM
  7.  
  8.     5622-880   5801-AAR
  9.  
  10.     (c) Copyright IBM Corp 1991, 1996.
  11.  
  12. ************************************************/
  13.  
  14. #include <somcls.idl>
  15. #include <sdsexc.idl>
  16.  
  17. interface DatastoreBase;
  18. interface PersistentObject;
  19.  
  20. interface POFactory : SOMClass
  21. {
  22.   sequence<PersistentObject> retrieveAll();
  23.   sequence<PersistentObject> select(in string clause);
  24.  
  25.   #ifdef __SOMIDL__
  26.   implementation
  27.   {
  28.      abstract;
  29.      releaseorder : retrieveAll,
  30.                     select;
  31.     passthru C_xh = "#ifndef __TOS_WIN__                         "
  32.                     " #ifndef __NO_DEFAULT_LIBS__                "
  33.                     "   #pragma library(\"SOMTK.LIB\")           "
  34.                     "   #ifdef __IMPORTLIB__                     "
  35.                     "      #pragma library(\"CPPOAI3I.LIB\")     "
  36.                     "   #else                                    "
  37.                     "      #pragma library(\"CPPOAI3.LIB\")      "
  38.                     "   #endif                                   "
  39.                     " #endif                                     "
  40.                     "#else                                       "
  41.                     " #ifndef __NO_DEFAULT_LIBS__                "
  42.                     "   #pragma library(\"SOMTK.LIB\")           "
  43.                     "   #ifdef __IMPORTLIB__                     "
  44.                     "      #pragma library(\"CPPWAI3I.LIB\")     "
  45.                     "   #else                                    "
  46.                     "      #pragma library(\"CPPWAI3.LIB\")      "
  47.                     "   #endif                                   "
  48.                     " #endif                                     "
  49.                     "#endif                                      ";
  50.     passthru C_h  = "#ifndef __TOS_WIN__                         "
  51.                     " #ifndef __NO_DEFAULT_LIBS__                "
  52.                     "   #pragma library(\"SOMTK.LIB\")           "
  53.                     "   #ifdef __IMPORTLIB__                     "
  54.                     "      #pragma library(\"CPPOAI3I.LIB\")     "
  55.                     "   #else                                    "
  56.                     "      #pragma library(\"CPPOAI3.LIB\")      "
  57.                     "   #endif                                   "
  58.                     " #endif                                     "
  59.                     "#else                                       "
  60.                     " #ifndef __NO_DEFAULT_LIBS__                "
  61.                     "   #pragma library(\"SOMTK.LIB\")           "
  62.                     "   #ifdef __IMPORTLIB__                     "
  63.                     "      #pragma library(\"CPPWAI3I.LIB\")     "
  64.                     "   #else                                    "
  65.                     "      #pragma library(\"CPPWAI3.LIB\")      "
  66.                     "   #endif                                   "
  67.                     " #endif                                     "
  68.                     "#endif                                      ";
  69.   };
  70.   #endif
  71. };
  72.  
  73. interface PersistentObject : SOMObject
  74. {
  75.    void add();
  76.    void update();
  77.    void del();
  78.    void retrieve();
  79.  
  80.    #ifdef __SOMIDL__
  81.    implementation
  82.    {
  83.       abstract;
  84.       releaseorder :
  85.                      add,
  86.                      update,
  87.                      del,
  88.                      retrieve;
  89.  
  90.       passthru C_xih = "#include \"spersist.xh\"";
  91.  
  92.       somInit : override;
  93.       somUninit : override;
  94.  
  95.       metaclass = POFactory;
  96.   };
  97.   #endif
  98. };
  99.  
  100. #endif /* spersist_idl */
  101.  
  102.