home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
pm6tool.zip
/
pmeister.INF
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1996-07-31
|
12KB
|
305 lines
ΓòÉΓòÉΓòÉ 1. Notices ΓòÉΓòÉΓòÉ
August 1996
The following paragraph does not apply to the United Kingdom or any country
where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS
MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states
do not allow disclaimer of express or implied warranties in certain
transactions, therefore, this statement may not apply to you.
This publication could include technical inaccuracies or typographical errors.
Changes are periodically made to the information herein; these changes will be
incorporated in new editions of the publication. IBM may make improvements
and/or changes in the product(s) and/or the program(s) described in this
publication at any time.
It is possible that this publication may contain reference to, or information
about, IBM products (machines and programs), programming, or services that are
not announced in your country. Such references or information must not be
construed to mean that IBM intends to announce such IBM products, programming,
or services in your country.
Requests for technical information about IBM products should be made to your
IBM reseller or IBM marketing representative.
ΓòÉΓòÉΓòÉ 1.1. Copyright Notices ΓòÉΓòÉΓòÉ
(C) Copyright International Business Machines Corporation 1993,1996. All rights
reserved.
Note to U.S. Government Users - Documentation related to restricted rights -
Use, duplication or disclosure is subject to restrictions set forth in GSA ADP
Schedule Contract with IBM Corp.
ΓòÉΓòÉΓòÉ 1.2. Disclaimers ΓòÉΓòÉΓòÉ
References in this publication to IBM products, programs, or services do not
imply that IBM intends to make these available in all countries in which IBM
operates. Any reference to an IBM product, program, or service is not intended
to state or imply that only that IBM product, program, or service may be used.
Subject to IBM's valid intellectual property or other legally protectable
rights, any functionally equivalent product, program, or service may be used
instead of the IBM product, program, or service. The evaluation and
verification of operation in conjunction with other products, except those
expressly designated by IBM, are the responsibility of the user.
IBM may have patents or pending patent applications covering subject matter in
this document. The furnishing of this document does not give you any license to
these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
500 Columbus Avenue
Thornwood, NY 10594
U.S.A.
Asia-Pacific users can inquire, in writing, to the IBM Director of
Intellectual Property and Licensing, IBM World Trade Asia Corporation, 2-31
Roppongi 3-chome, Minato-ku, Tokyo 106, Japan.
Licensees of this program who wish to have information about it for the
purpose of enabling: (i) the exchange of information between independently
created programs and other programs (including this one) and (ii) the mutual
use of the information which has been exchanged, should contact IBM
Corporation, Department LZKS, 11400 Burnet Road, Austin, TX 78758 U.S.A. Such
information may be available, subject to appropriate terms and conditions,
including in some cases, payment of a fee.
ΓòÉΓòÉΓòÉ 1.3. Trademarks ΓòÉΓòÉΓòÉ
The following terms are trademarks of the IBM Corporation in the United States
or other countries or both:
IBM
OS/2
Presentation Manager
PS/2
TalkLink
The following terms are trademarks of other companies:
OpenDoc (Apple Computer, Inc.)
Windows (Microsoft Corporation)
ΓòÉΓòÉΓòÉ 2. Overview ΓòÉΓòÉΓòÉ
PartMeister is a code generator that creates OpenDoc components from templates.
In this release, templates are provided for creating parts derived from the
ContainerPart sample part shipped with the toolkit.
Additional templates for the BaseNonContainer and Table parts are available
from Club OpenDoc.
By using PartMeister to generate a new component, you may immediately compile
the code, register the component and test it out.
Templates may be added and modified, allowing the tool to be extended.
ΓòÉΓòÉΓòÉ 3. Support ΓòÉΓòÉΓòÉ
Updates for PartMeister will be available on the WorldWide Web at Club OpenDoc
http://www.software.ibm.com/clubopendoc
Support for this tool and accompanying documentation is available
electronically from,
Club OpenDoc (see URL above)
CI-Labs list server (OpenDoc-Interest@CILabs.ORG)
Internet mail to opendoc@austin.ibm.com
the OPENDOC CFORUM on TalkLink
for IBM staff, OPENDOC FORUM on IBMPC
ΓòÉΓòÉΓòÉ 4. System Configuration ΓòÉΓòÉΓòÉ
Setting up a development system
ΓòÉΓòÉΓòÉ 4.1. Setting up the Development Environment ΓòÉΓòÉΓòÉ
The OpenDoc installation provides all the tools and files required to start
OpenDoc development, but does not set up a working environment. It is
recommended that the following guidelines be followed to make part development
more organized and easy to manage.
Two separate directories should be used for part development, one for base (or
shared) parts/files and one for leaf parts/files. This setup permits options
including the use of a network directory for shared files, with local
directories for individual developer work.
The three directories set up in PartMeister (runtime, public and output),
should be on the same drive. This allows makefiles to be built without using
drive letters, making them more useful when shared.
For example, the following may be a typical setup,
runtime - D:\OPENDOC\BIN
base - D:\BASEPART
leaf - D:\ODPARTS
The public directory, holding shared files, is located within the base
directory (D:\BASEPART\PUBLIC).
ΓòÉΓòÉΓòÉ 4.2. Using the shipped OpenDoc Utilities ΓòÉΓòÉΓòÉ
The OpenDoc toolkit is shipped with a set of optional utility files that ease
the development of OpenDoc parts. The templates provided with PartMeister take
advantage of some of these files.
In the OS/2 implementation, the utility files are contained in the
TOOLKIT\BETA\SAMPLES\OPENDOC\PUBUTILS directory. In the Windows implementation,
the utility files are in the OpenDoc directory in the SAMPLES directory.
Copy these files to your PUBLIC directory.
ΓòÉΓòÉΓòÉ 5. Using PartMeister the First Time ΓòÉΓòÉΓòÉ
Settings (from the 'Settings' dialog) must be set before generating any
components with PartMeister.
The 'Copyright' page specifies the information that will be contained in the
header comments for source files.
The 'Directory' page requires four directories to be set,
Runtime - where the OpenDoc runtime executables/DLLs are located, used in
the make file to specify where the output component should be.
Public files - where to locate and store files that are common to more
than one component
Output - directory to use as the base for where components will be
generated. This directory must exist, and is recommended to be a separate
directory under the root directory (ie. C:\ODPARTS).
ΓòÉΓòÉΓòÉ 6. Creating a new component ΓòÉΓòÉΓòÉ
Select a template on the Template page, then fill in the Part page.
Fill in the name of your new class, and a short name (a short name is 8
characters or less and must contain characters that are valid for a filename -
it is used as the name of the directory that the files are generated into and
for the filenames of the generated files).
Category refers to the broad definition of the data type for the part. A list
of currently defined categories is provided, or you may fill in a new category.
Kind is the specific data type (for example, a word-processor specific text
format) of the part.
The Symbols page provides a page for templates with requirements for additional
symbols for the code generator. Each symbol may be selected from the list
provided, and its individual value updated.
When the fields have been filled in to your satisfaction, select 'Generate'
from the 'Part' menu to generate the part files. You may then use NMAKE with
the generated make file to compile and link the part.
ΓòÉΓòÉΓòÉ 7. Templates ΓòÉΓòÉΓòÉ
The foundation of the code generation capabilities of PartMeister are
templates. PartMeister is extended through the addition of new templates, which
may be written by individual developers or received from others.
ΓòÉΓòÉΓòÉ 7.1. Adding a template to PartMeister ΓòÉΓòÉΓòÉ
If you create or receive a template, you may add it to the available templates
by copying the .TPL file and the associated code generation files to the
PartMeister directory. PartMeister scans the directory for template definition
files when loaded.
ΓòÉΓòÉΓòÉ 7.2. Creating a template ΓòÉΓòÉΓòÉ
Templates are used to extend the function of PartMeister by providing new
models for code generation. Often templates will implement derived components,
and that a superclass may have more than one associated template.
ΓòÉΓòÉΓòÉ 7.2.1. Steps ΓòÉΓòÉΓòÉ
To create a template to generate a derived class,
create an OpenDoc part to be subclassed
implement a subclass of the part
replace the appropriate values with replaceable parameters
name the template files appropriately
create a template definition file (.TPL)
ΓòÉΓòÉΓòÉ 7.3. Replaceable parameters and functions ΓòÉΓòÉΓòÉ
Replaceable parameters take the form $parameter$. Functions that operate on
parameters take the form $parameter:function$.
Available replaceable parameters are,
partname - name of the IDL interface (class name)
filename - file name for the new components files
parentname - IDL interface name of parent
parentfilename - file name of parent files
author - name of component author
company - company holding copyright
years - year, or years, for copyright notice
category - OpenDoc part category
kind - OpenDoc part kind
displayname - display name
kinddisplayname - kind display name
categorydisplayname - category display name
runtimepath - OpenDoc runtime directory
publicpath - public files directory
outputpath - target path for generation
toolname - Name of tool generating files
toolversion - Version number of tool generating files
Available functions are,
toupper - change parameter to upper case
tolower - change parameter to lower case
The following are two examples of function usage,
$filename:toupper$
$partname:tolower$