home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / pm6tool.zip / pmeister.INF (.txt) < prev    next >
OS/2 Help File  |  1996-07-31  |  12KB  |  305 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Notices ΓòÉΓòÉΓòÉ
  3.  
  4. August 1996 
  5.  
  6. The following paragraph does not apply to the United Kingdom or any country 
  7. where such provisions are inconsistent with local law:  INTERNATIONAL BUSINESS 
  8. MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY 
  9. KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  10. WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states 
  11. do not allow disclaimer of express or implied warranties in certain 
  12. transactions, therefore, this statement may not apply to you. 
  13.  
  14. This publication could include technical inaccuracies or typographical errors. 
  15. Changes are periodically made to the information herein; these changes will be 
  16. incorporated in new editions of the publication. IBM may make improvements 
  17. and/or changes in the product(s) and/or the program(s) described in this 
  18. publication at any time. 
  19.  
  20. It is possible that this publication may contain reference to, or information 
  21. about, IBM products (machines and programs), programming, or services that are 
  22. not announced in your country.  Such references or information must not be 
  23. construed to mean that IBM intends to announce such IBM products, programming, 
  24. or services in your country. 
  25.  
  26. Requests for technical information about IBM products should be made to your 
  27. IBM reseller or IBM marketing representative. 
  28.  
  29.  
  30. ΓòÉΓòÉΓòÉ 1.1. Copyright Notices ΓòÉΓòÉΓòÉ
  31.  
  32. (C) Copyright International Business Machines Corporation 1993,1996. All rights 
  33. reserved. 
  34. Note to U.S. Government Users - Documentation related to restricted rights - 
  35. Use, duplication or disclosure is subject to restrictions set forth in GSA ADP 
  36. Schedule Contract with IBM Corp. 
  37.  
  38.  
  39. ΓòÉΓòÉΓòÉ 1.2. Disclaimers ΓòÉΓòÉΓòÉ
  40.  
  41. References in this publication to IBM products, programs, or services do not 
  42. imply that IBM intends to make these available in all countries in which IBM 
  43. operates. Any reference to an IBM product, program, or service is not intended 
  44. to state or imply that only that IBM product, program, or service may be used. 
  45. Subject to IBM's valid intellectual property or other legally protectable 
  46. rights, any functionally equivalent product, program, or service may be used 
  47. instead of the IBM product, program, or service. The evaluation and 
  48. verification of operation in conjunction with other products, except those 
  49. expressly designated by IBM, are the responsibility of the user. 
  50.  
  51. IBM may have patents or pending patent applications covering subject matter in 
  52. this document. The furnishing of this document does not give you any license to 
  53. these patents. You can send license inquiries, in writing, to: 
  54.  
  55.       IBM Director of Licensing 
  56.       IBM Corporation 
  57.       500 Columbus Avenue 
  58.       Thornwood, NY  10594 
  59.       U.S.A. 
  60.  
  61.  Asia-Pacific users can inquire, in writing, to the IBM Director of 
  62.  Intellectual Property and Licensing, IBM World Trade Asia Corporation, 2-31 
  63.  Roppongi 3-chome, Minato-ku, Tokyo 106, Japan. 
  64.  
  65.  Licensees of this program who wish to have information about it for the 
  66.  purpose of enabling: (i) the exchange of information between independently 
  67.  created programs and other programs (including this one) and (ii) the mutual 
  68.  use of the information which has been exchanged, should contact IBM 
  69.  Corporation, Department LZKS, 11400 Burnet Road, Austin, TX 78758 U.S.A.  Such 
  70.  information may be available, subject to appropriate terms and conditions, 
  71.  including in some cases, payment of a fee. 
  72.  
  73.  
  74. ΓòÉΓòÉΓòÉ 1.3. Trademarks ΓòÉΓòÉΓòÉ
  75.  
  76. The following terms are trademarks of the IBM Corporation in the United States 
  77. or other countries or both: 
  78.  
  79.       IBM 
  80.       OS/2 
  81.       Presentation Manager 
  82.       PS/2 
  83.       TalkLink 
  84.  
  85.  The following terms are trademarks of other companies: 
  86.  
  87.       OpenDoc (Apple Computer, Inc.) 
  88.       Windows (Microsoft Corporation) 
  89.  
  90.  
  91. ΓòÉΓòÉΓòÉ 2. Overview ΓòÉΓòÉΓòÉ
  92.  
  93. PartMeister is a code generator that creates OpenDoc components from templates. 
  94. In this release, templates are provided for creating parts derived from the 
  95. ContainerPart sample part shipped with the toolkit. 
  96.  
  97. Additional templates for the BaseNonContainer and Table parts are available 
  98. from Club OpenDoc. 
  99.  
  100. By using PartMeister to generate a new component, you may immediately compile 
  101. the code, register the component and test it out. 
  102.  
  103. Templates may be added and modified, allowing the tool to be extended. 
  104.  
  105.  
  106. ΓòÉΓòÉΓòÉ 3. Support ΓòÉΓòÉΓòÉ
  107.  
  108. Updates for PartMeister will be available on the WorldWide Web at Club OpenDoc 
  109. http://www.software.ibm.com/clubopendoc 
  110.  
  111. Support for this tool and accompanying documentation is available 
  112. electronically from, 
  113.  
  114.      Club OpenDoc (see URL above) 
  115.  
  116.      CI-Labs list server (OpenDoc-Interest@CILabs.ORG) 
  117.  
  118.      Internet mail to opendoc@austin.ibm.com 
  119.  
  120.      the OPENDOC CFORUM on TalkLink 
  121.  
  122.      for IBM staff, OPENDOC FORUM on IBMPC 
  123.  
  124.  
  125. ΓòÉΓòÉΓòÉ 4. System Configuration ΓòÉΓòÉΓòÉ
  126.  
  127. Setting up a development system 
  128.  
  129.  
  130. ΓòÉΓòÉΓòÉ 4.1. Setting up the Development Environment ΓòÉΓòÉΓòÉ
  131.  
  132. The OpenDoc installation provides all the tools and files required to start 
  133. OpenDoc development, but does not set up a working environment. It is 
  134. recommended that the following guidelines be followed to make part development 
  135. more organized and easy to manage. 
  136.  
  137. Two separate directories should be used for part development, one for base (or 
  138. shared) parts/files and one for leaf parts/files. This setup permits options 
  139. including the use of a network directory for shared files, with local 
  140. directories for individual developer work. 
  141.  
  142. The three directories set up in PartMeister (runtime, public and output), 
  143. should be on the same drive. This allows makefiles to be built without using 
  144. drive letters, making them more useful when shared. 
  145.  
  146. For example, the following may be a typical setup, 
  147.  
  148.      runtime - D:\OPENDOC\BIN 
  149.  
  150.      base - D:\BASEPART 
  151.  
  152.      leaf - D:\ODPARTS 
  153.  
  154.  The public directory, holding shared files, is located within the base 
  155.  directory (D:\BASEPART\PUBLIC). 
  156.  
  157.  
  158. ΓòÉΓòÉΓòÉ 4.2. Using the shipped OpenDoc Utilities ΓòÉΓòÉΓòÉ
  159.  
  160. The OpenDoc toolkit is shipped with a set of optional utility files that ease 
  161. the development of OpenDoc parts. The templates provided with PartMeister take 
  162. advantage of some of these files. 
  163.  
  164. In the OS/2 implementation, the utility files are contained in the 
  165. TOOLKIT\BETA\SAMPLES\OPENDOC\PUBUTILS directory. In the Windows implementation, 
  166. the utility files are in the OpenDoc directory in the SAMPLES directory. 
  167.  
  168. Copy these files to your PUBLIC directory. 
  169.  
  170.  
  171. ΓòÉΓòÉΓòÉ 5. Using PartMeister the First Time ΓòÉΓòÉΓòÉ
  172.  
  173. Settings (from the 'Settings' dialog) must be set before generating any 
  174. components with PartMeister. 
  175.  
  176. The 'Copyright' page specifies the information that will be contained in the 
  177. header comments for source files. 
  178.  
  179. The 'Directory' page requires four directories to be set, 
  180.  
  181.      Runtime - where the OpenDoc runtime executables/DLLs are located, used in 
  182.       the make file to specify where the output component should be. 
  183.  
  184.      Public files - where to locate and store files that are common to more 
  185.       than one component 
  186.  
  187.      Output - directory to use as the base for where components will be 
  188.       generated. This directory must exist, and is recommended to be a separate 
  189.       directory under the root directory (ie. C:\ODPARTS). 
  190.  
  191.  
  192. ΓòÉΓòÉΓòÉ 6. Creating a new component ΓòÉΓòÉΓòÉ
  193.  
  194. Select a template on the Template page, then fill in the Part page. 
  195.  
  196. Fill in the name of your new class, and a short name (a short name is 8 
  197. characters or less and must contain characters that are valid for a filename - 
  198. it is used as the name of the directory that the files are generated into and 
  199. for the filenames of the generated files). 
  200.  
  201. Category refers to the broad definition of the data type for the part. A list 
  202. of currently defined categories is provided, or you may fill in a new category. 
  203.  
  204. Kind is the specific data type (for example, a word-processor specific text 
  205. format) of the part. 
  206.  
  207. The Symbols page provides a page for templates with requirements for additional 
  208. symbols for the code generator. Each symbol may be selected from the list 
  209. provided, and its individual value updated. 
  210.  
  211. When the fields have been filled in to your satisfaction, select 'Generate' 
  212. from the 'Part' menu to generate the part files.  You may then use NMAKE with 
  213. the generated make file to compile and link the part. 
  214.  
  215.  
  216. ΓòÉΓòÉΓòÉ 7. Templates ΓòÉΓòÉΓòÉ
  217.  
  218. The foundation of the code generation capabilities of PartMeister are 
  219. templates. PartMeister is extended through the addition of new templates, which 
  220. may be written by individual developers or received from others. 
  221.  
  222.  
  223. ΓòÉΓòÉΓòÉ 7.1. Adding a template to PartMeister ΓòÉΓòÉΓòÉ
  224.  
  225. If you create or receive a template, you may add it to the available templates 
  226. by copying the .TPL file and the associated code generation files to the 
  227. PartMeister directory. PartMeister scans the directory for template definition 
  228. files when loaded. 
  229.  
  230.  
  231. ΓòÉΓòÉΓòÉ 7.2. Creating a template ΓòÉΓòÉΓòÉ
  232.  
  233. Templates are used to extend the function of PartMeister by providing new 
  234. models for code generation.  Often templates will implement derived components, 
  235. and that a superclass may have more than one associated template. 
  236.  
  237.  
  238. ΓòÉΓòÉΓòÉ 7.2.1. Steps ΓòÉΓòÉΓòÉ
  239.  
  240. To create a template to generate a derived class, 
  241.  
  242.      create an OpenDoc part to be subclassed 
  243.  
  244.      implement a subclass of the part 
  245.  
  246.      replace the appropriate values with replaceable parameters 
  247.  
  248.      name the template files appropriately 
  249.  
  250.      create a template definition file (.TPL) 
  251.  
  252.  
  253. ΓòÉΓòÉΓòÉ 7.3. Replaceable parameters and functions ΓòÉΓòÉΓòÉ
  254.  
  255. Replaceable parameters take the form $parameter$.  Functions that operate on 
  256. parameters take the form $parameter:function$. 
  257.  
  258. Available replaceable parameters are, 
  259.  
  260.      partname - name of the IDL interface (class name) 
  261.  
  262.      filename - file name for the new components files 
  263.  
  264.      parentname - IDL interface name of parent 
  265.  
  266.      parentfilename - file name of parent files 
  267.  
  268.      author - name of component author 
  269.  
  270.      company - company holding copyright 
  271.  
  272.      years - year, or years, for copyright notice 
  273.  
  274.      category - OpenDoc part category 
  275.  
  276.      kind - OpenDoc part kind 
  277.  
  278.      displayname - display name 
  279.  
  280.      kinddisplayname - kind display name 
  281.  
  282.      categorydisplayname - category display name 
  283.  
  284.      runtimepath - OpenDoc runtime directory 
  285.  
  286.      publicpath - public files directory 
  287.  
  288.      outputpath - target path for generation 
  289.  
  290.      toolname - Name of tool generating files 
  291.  
  292.      toolversion - Version number of tool generating files 
  293.  
  294.  Available functions are, 
  295.  
  296.      toupper - change parameter to upper case 
  297.  
  298.      tolower - change parameter to lower case 
  299.  
  300.  The following are two examples of function usage, 
  301.  
  302.      $filename:toupper$ 
  303.  
  304.      $partname:tolower$ 
  305.