home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / smarts / dts / read.me < prev    next >
Encoding:
Text File  |  1996-02-21  |  7.1 KB  |  194 lines

  1. --------------------------------------------------------------------------------
  2. --
  3. -- COPYRIGHT:
  4. --   IBM WorkFrame - Project Smarts
  5. --   (C) Copyright International Business Machines Corporation 1996
  6. --   Licensed Material - Program-Property of IBM - All Rights Reserved.
  7. --   US Government Users Restricted Rights - Use, duplication, or disclosure
  8. --   restricted by GSA ADP Schedule Contract with IBM Corp.
  9. --
  10. --------------------------------------------------------------------------------
  11.  
  12.  
  13. Project Smarts - Direct-to-SOM (DTS) application README
  14. _______________________________________________________
  15.  
  16.  
  17. TARGET(S):
  18. _________
  19.  
  20. <if ($BUILD_DLL_AND_EXE$)>
  21. The layout of this project is as shown below:
  22.  
  23.   +-----------------------------------------------------+
  24.   |          Direct-to-SOM Application                  |
  25.   |   (Builds an executable client program that         |
  26.   |      uses objects in the DTS DLL project.)          |
  27.   |                                                     |
  28.   |                                                     |
  29.   |         +----------------------------------+        |
  30.   |         |         DTS DLL Project          |        |
  31.   |         |  (Builds the DLL that contains   |        |
  32.   |         |        your DTS classes.)        |        |
  33.   |         +----------------------------------+        |
  34.   |                                                     |
  35.   +-----------------------------------------------------+
  36. </if>
  37.  
  38. This project builds:
  39.  
  40. [1] A $DLL_NAME$.dll dynamic link library.
  41. <if ($BUILD_DLL_AND_EXE$)>
  42. [2] A main $EXE_NAME$.EXE executable program.
  43. </if>
  44.  
  45.  
  46. ABOUT THIS APPLICATION:
  47. _______________________
  48.  
  49.  
  50. DTS Project Smarts has constructed a skeletal framework for $DLL_NAME$.dll,
  51. a DLL consisting of DTS C++ classes based on the information you
  52. provided to DTS Project Smarts.  $DLL_NAME$.dll encorporates the DTS
  53. C++ classes specified on the "DTS Classes" page of DTS Project Smarts.
  54.  
  55. For each DTS class included in the DLL, a corresponding '.hh' class definition
  56. file and '.cpp' implementation file has been generated.  These files are
  57. named after the class they contain but in certain instances the file names
  58. may be shortened.  For example, if the class name is greater than 8
  59. characters and the 'use long files names' options on page "DTS Classes" of
  60. DTS Project Smarts has not been selected, or if the file resides on a FAT
  61. file system.
  62.  
  63.  
  64. CUSTOMIZING YOUR DLL:
  65. ____________________
  66.  
  67.  
  68. In order for $DLL_NAME$.dll to be of any use, you will need to flesh out
  69. the body of each DTS C++ class and file.  To do this, follow the three
  70. easy steps listed below:
  71.  
  72.  
  73. [1]  Edit the '.hh' file corresponding to a DTS C++ class and fill in the
  74.      class definition by adding any types, data members, member functions
  75.      and SOM pragmas you require.  You may also add C++ code outside the
  76.      class such as global types, data or functions.
  77.  
  78. [2]  For the same class, edit the associated '.cpp' file and add any
  79.      definitions required to complete the class, such as definitions for
  80.      member functions or static member data.
  81.  
  82. [3]  Repeat the above steps [1]-[2] for each DTS C++ class included in
  83.      $DLL_NAME$.dll.
  84.  
  85.  
  86. An initialization function for the class library must be provided to support
  87. dynamic loading of the library by the SOM Class Manager.  The name of this
  88. function is SOMInitModule and it is located in file SOMINIT.CPP.  By default
  89. function SOMinitModule creates a single instance of each DTS C++ class'
  90. class object.  You may edit this file and customize the initialization
  91. function as desired.
  92.  
  93.  
  94. *NOTE*
  95. ______
  96.  
  97.    o If you are not sure of any C++ coding restrictions imposed on a DTS
  98.      C++ class, please refer to VisualAge for C++'s User's Guide.
  99.  
  100.    o If you require any information on the SOM Toolkit or SOM API calls
  101.      refer to the SOM Toolkit Users Guide and/or SOM Toolkit Programmers
  102.      Reference Manual.
  103.  
  104.  
  105. LOCATION, LOCATION, LOCATION:
  106. ____________________________
  107.  
  108.  
  109. If you opted to create just a DTS C++ DLL, then all the '.hh' and '.cpp'
  110. skeleton files, along with SOMINIT.CPP reside in the same sub-directory
  111. as this README.  Within WorkFrame, you may edit these files by
  112. double-clicking on their names.
  113.  
  114. If you opted to create a DLL and EXE file, then the '.hh' and '.cpp'
  115. skeleton files for the DLL, along with SOMINIT.CPP reside in a child
  116. sub-directory, named DTSDLL, of the directory in which this README resides.
  117. To edit these files, open up the sub-project for $DLL_NAME$.dll by
  118. double-clicking on $DLL_NAME$.iwp.  Then, within WorkFrame, double-click
  119. on each file you wish to edit.
  120.  
  121.  
  122. BUILDING YOUR DLL:
  123. _________________
  124.  
  125.  
  126. Once customization of each class and the initialization function is complete,
  127. build $DLL_NAME$.dll by selecting "Build Normal" in the "Project" menu
  128. located at the top left of $DLL_NAME$.dll's project window.
  129.  
  130. If you decide to enhance your DLL by adding files not created by DTS Project
  131. Smarts to your DLL, you may need to use the MakeMake or other options within
  132. WorkFrame to build your project. In this case, please refer to WorkFrame's
  133. Users Guide in order to build your project correctly.
  134.  
  135.  
  136. <if ($BUILD_DLL_AND_EXE$)>
  137. CUSTOMIZING .EXE FILE:
  138. _____________________
  139.  
  140. DTS Project Smarts has also created a skeleton $EXE_NAME$.cpp for you.
  141. The file resides in the same directory as this README, and currently
  142. includes each DTS C++ class you specified on page "DTS Classes" and provides
  143. a hollow function 'main'.  Edit $EXE_NAME$.cpp and customize it to
  144. instantiate and exploit the DTS C++ classes you have just designed.
  145.  
  146. To build both $EXE_NAME$.exe and $DLL_NAME$.dll, select "Build Normal"
  147. in the "Project" pull-down menu located at the top left of $EXE_NAME$.exe's
  148. project window.
  149.  
  150. </if>
  151.  
  152. <if ($DSOM$)>
  153. Distributed-SOM (DSOM):
  154. ______________________
  155.  
  156.  
  157. The class(es) included in $DLL_NAME$.dll are DSOM enabled.
  158.  
  159. There are two noteable differences between a SOM and DSOM enabled
  160. DTS C++ project generated by Project Smarts.
  161.  
  162. [1] Pragma SOMIDLPass is added at the bottom of every class definition
  163.     file.  Pragma SOMIDLPass provides the necessary information for DSOM
  164.     servers to locate each class's DLL when when they consult the Interface
  165.     Repository.
  166.  
  167. [2] DSOMREG.MAK is created to register your DTS C++ class's IDL interfaces
  168.     into the Interface Repository "$SOM_IR_FILE$", and to register
  169.     "$SOM_SERVER$"s implemenatation and it's associated classes with the
  170.     Implementation Repository.
  171.  
  172.  
  173.  
  174. BUILDING A DSOM PROJECT:
  175. ________________________
  176.  
  177.  
  178. Build your DSOM project in the same manner as you would a regular DTS C++
  179. project by following the steps listed in each prior section.  Once your
  180. DLL and/or EXE builds cleanly you may then register your classes and
  181. DSOM server.  This last step is completed by running "DSOM registration"
  182. from the project menu, or IDSOMREG from the command line.
  183.  
  184.  
  185.  
  186. *NOTE*
  187. ______
  188.  
  189.  
  190. You must ensure your environment is set up correctly to build and run a
  191. DSOM project.  Refer to the SOM Toolkit Users Guide if you are not sure
  192. what environment settings are required.
  193. </if>
  194.