home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / oewoe2.zip / readme.txt < prev    next >
Text File  |  1994-03-29  |  20KB  |  551 lines

  1. (c) Innovative Software GmbH, 1990 - 1994, all rights reserved.
  2.  
  3.  
  4.  
  5.     The Object Engineering Workbench for C++ (tm) V1.3
  6.  
  7.     
  8.  
  9.                GETTING STARTED NOTES 
  10.                =====================
  11.  
  12.  
  13.  
  14. Introduction
  15. ============
  16.  
  17. These notes highlight points about the operation of OEW.  Please 
  18. read them through.  If you have any difficulties, please make 
  19. contact with the support address listed above.
  20.  
  21.  
  22.  
  23. Frequently asked questions
  24. ==========================
  25.  
  26. How do I make a class?
  27.     Click on Edit / New class or
  28.     press "+" button on the toolbar or
  29.     press <crtl> + N on the keyboard.
  30.  
  31. How do I move a class?
  32.     Hold down the <Ctrl>+ RIGHT Mouse Button and Drag.
  33.  
  34. How do I make a member?
  35.     Doubleclick on a class
  36.     press the New Slot button
  37.     fill out the dialog and press OK.
  38.  
  39. How do I make a member fucnction?
  40.     Doubleclick on a class
  41.     press the New Slot button
  42.     choose "Method" as the slottype
  43.     press "More" to enter the design and programming dialog
  44.     fill out the dialogs and press OK.
  45.  
  46. How do I make an inheritance relationship?
  47.     Drag a line with the left mouse button pressed from one 
  48.     class to another,
  49.     release the button.
  50.  
  51. How can I remove an inheritance relationship?
  52.     Drag a line with the left mouse button pressed from the 
  53.     superclass to the subclass,
  54.     release the button.
  55.  
  56. How do I make other relationships?
  57.     Press the ORM button of the Toolbar,
  58.     to call up the Object Relational Modeler.
  59.     The first thing you want to do is call the View/Reformat/Class 
  60.     Hierarchy Menu to make the graph a bit prettier.
  61.     Next Drag a line (Left Mouse Button) to connect two classes and 
  62.     a Edit Relation dialog pops up.
  63.     Choose the type of the relation (In Both Directions) and press OK.
  64.  
  65. How to get submodels?
  66.     You can collect parts of the whole hierarchie in so-called Views.
  67.     A View is a collection of classes and their relationships. Each class 
  68.     can appear in different views.
  69.     To create a view click on the magnifying class icon on the toolbar and
  70.     define views as described in the online help.
  71.  
  72.  
  73.  
  74. Neat things to test out:
  75. ========================
  76.  
  77. Quick Reference :     
  78.     A Quick way to get class information.
  79.     Press F5 or Edit/Quick Refrence Menu option
  80.     and enter the name of the object.
  81.  
  82. ClassList : 
  83.     A List box of classes.
  84.     The toolbar button right of the binoculars or View/Overview Menu option
  85.  
  86. OverView : 
  87.     A Graphics Overview of the hierarchy.
  88.     The toolbar button of the binoculars or the View/Overview Menu option
  89.  
  90.  
  91. The Main Window and the ORM Window
  92. ==================================
  93.  
  94. Both the main window and the ORM window can be open at the 
  95. same time (especially on a big screen).
  96.  
  97. OEW/ORM is an additional module that adds to the analysis level 
  98. of the workbench.  It does this by displaying member class 
  99. relationships (that is: "has a", "whole/part", "uses", or "contains", 
  100. depending on your terminology), and reference relationships, as 
  101. well as inheritance relationships.  Note that in the Edit 
  102. relationship dialog box you can add your own terminology for 
  103. relationships.  These are called "relationship labels".  The ability 
  104. to name relationships lets you incorporate terminology from the 
  105. methodology of your choice.  This is in keeping with the design 
  106. philosophy of OEW, in not seeking to introduce a new 
  107. methodology, but to support the concepts inherent in existing 
  108. methodologies.  It aims to support the ideas that express meaning 
  109. in a model, and at the same time map these meanings to constructs 
  110. supported by the language.
  111.  
  112. To concentrate on member class and reference relationships, use 
  113. the ORM window.  To concentrate on inheritance relationships, 
  114. use the main window.
  115.  
  116. You can have both windows open at the same time.  Classes are 
  117. accessible through the Class dialog box in both windows.  
  118. Double click on the class icon.
  119.  
  120.  
  121. Differences between the two windows
  122. ===================================
  123.  
  124. Relationships can be declared in either window.  What varies 
  125. between the two windows is which relationships can be 
  126. displayed and which ones can be declared and defined.  The 
  127. differences can be seen when you compare the following 
  128. tables:
  129.  
  130.     Main window
  131.  
  132.         relationship    visible        declaration    definition
  133.         ------------    -------        -----------    ----------
  134.  
  135.         inheritance    yes        yes        yes
  136.         member class    no        yes        yes
  137.         reference    no        yes        yes
  138.  
  139.     ORM window
  140.  
  141.         relationship    visible        declaration    definition
  142.         ------------    -------        -----------    ----------
  143.  
  144.         inheritance    yes        yes        no
  145.         member class    yes        yes        yes
  146.         reference    yes        yes        yes
  147.  
  148.  
  149. Importing Source Code
  150. =====================
  151.  
  152. We find that one of the first things people wish to do with OEW is 
  153. import existing code.  Please be aware of the following:
  154.  
  155. 1.  The parser analyses code for constructs that can be stored in 
  156. the objectbase (classes, data members, member functions and 
  157. datatypes).  Fragments of code that cannot be recognised (for 
  158. example: includes to C function libraries, or some comments) are 
  159. filed in modules. Go EDIT/MODULES to see this code.
  160.  
  161. 2.  It is important to check that the include path in the Import 
  162. from source dialog box is set properly.  For example, if you select 
  163. a source file, make sure there is a path to the directory containing 
  164. the header file.  It is not necessary to set a path to included C 
  165. function libraries.  The include path defaults to the path defined in 
  166. the SET INCLUDE statement (if there is one) in your AUTOEXEC.BAT file.  
  167. It is possible to enter a series of paths in the include path edit field. 
  168. For your first import we suggest to leave the include path edit field 
  169. empty and to select the "execute #includes" option. 
  170.  
  171. 3.  It is not necessary to import a large group of classes to test the 
  172. parser.  We suggest that you choose a small group of classes that 
  173. are representative of the way you work.  You can start by importing the 
  174. header files and after the first view of the model you may import the source 
  175. code too. OEW's purpose is to encourage you to design and program 
  176. applications using C++ as an object-oriented language.  In practice, not 
  177. everything may be 'object-oriented', because of design and time limitations.  
  178. OEW therefore provides modules to incorporate these functional 
  179. elements of the design into the model.
  180.  
  181. 4.  It is a good idea to create (save) an objectbase for a model 
  182. before generating or importing code.  This ensures that the source 
  183. code files are generated into a unique directory. After your final code generation 
  184. you should save the objectbase again to make sure that the date set for the 
  185. objectbase is newer than the source files. The next time you load your model, OEW 
  186. will check if any changes to he source files have occured. This can only work properly 
  187. if only those files have a newer date that are changed manually outside OEW.
  188.  
  189. 5.  You can save a model while working in the dialog boxes by 
  190. using the Shift + F12 key combination.
  191.  
  192. 6.  After an import, it is advisable to check the list of datatypes 
  193. (enumerations and typedefs) added to the built-in types. Select 
  194. Edit datatypes from the Types menu.
  195.  
  196.  
  197. Working with Class Libraries
  198. ============================
  199.  
  200. You may wish to import a whole class library, such as the Borland Object 
  201. Windows Library or the Microsoft Foundation Classes to see how OEW works. 
  202. But this is not necessary to write code using the library. There are various 
  203. possibilities in working with class libraries:
  204.  
  205. 1. Class libraries with a code generator
  206.  
  207. Many class libraries, e.g. for programming the user interface of your 
  208. application, provide an IDE with a C++ code generator. You graphically 
  209. model your user interface and then generate C++ code. This C++ code 
  210. consists of classes which are derived from the classes in the 
  211. library. If you import the generated code (header and source files) using 
  212. the "import all" option you will find the classes you created and the 
  213. library classes they are derived from in your OEW model. You can then 
  214. add functionality to the application by adding slots (data members and
  215. member functions) using OEW. The library classes will not have any
  216. slots unless you set the import path to the include directory of the 
  217. class library. OEW needs the empty library classes to generate the 
  218. inheritance stucture properly. Make sure that the class library 
  219. is included in the right module header schemes.
  220.  
  221. 2. Class libraries without a code generator
  222.  
  223. Create an empty class for each class of the class library you need. Mark 
  224. these classes as library classes. Than derive your application classes from 
  225. these library classes using the right click popup menu. Proceed as 
  226. described above. 
  227.  
  228.  
  229. Rearranging Diagrams
  230. ====================
  231.  
  232. Both diagrams can be rearranged for better presentation and easier 
  233. reading. For more details please refer also to the help topic 
  234. "Mouse Operations".
  235.  
  236. Inheritance Diagram (class hierarchy)
  237. =====================================
  238.  
  239. Focus on a class in the class hierarchy and use the Crtl key 
  240. with the right mouse button.  Hold down the button and drag 
  241. the class to its new position, then release the button.  This 
  242. option does not work if you choose to have the Sort classes 
  243. alphabetically option on (see the View menu).
  244.  
  245. Relationship Diagram (Object Relationship Model)
  246. ================================================
  247.  
  248. Mark a class (single left click), and use the Crtl key with the 
  249. right mouse button.  Hold down the button and drag the class 
  250. to its new position, then release the button.  This diagram is 
  251. based on a grid, the size of which is dependent on the longest 
  252. class name, and the font type and size.  Note that you can 
  253. mark and move more than one class at a time.
  254.  
  255.  
  256. Marking Classes
  257. ===============
  258.  
  259. It can be useful for some tasks to work on a number of classes at 
  260. once, for instance moving classes in the relationship diagram, or 
  261. marking classes as library classes.  See the online help topics 
  262. Marking classes and Edit multiple classes.
  263.  
  264.  
  265. New Class
  266. =========
  267.  
  268. There are a number of ways to enter a new class.  See the Add 
  269. new class topic.  In the ORM window, you can position the cursor 
  270. in a selected spot on the background of the window and double 
  271. left click to add a new class.  The new class will be added to the 
  272. diagram at the selected grid position.
  273.  
  274. Note also that you can enter more than one class at a time by 
  275. separating the class names by commas.
  276.  
  277. See the Class dialog box help topic for detail on creating a class 
  278. and its attributes and methods.
  279.  
  280.  
  281. Import from Objectbase
  282. ======================
  283.  
  284. Once you have created a model, you can reuse classes, instances 
  285. and datatypes in a new model by using the Import from 
  286. objectbase function (on the Edit menu).  Note that you have the 
  287. option to import the associated scheme files as well.
  288.  
  289.  
  290. Quick Reference
  291. ===============
  292.  
  293. The quick reference is a browser which you can access with the 
  294. shift+F5 function key while you are in another dialog box, for example, 
  295. in the Class dialog box.  It can be very useful when you are 
  296. working on one class, and you want information about another 
  297. class.
  298.  
  299.  
  300. Global File Names
  301. =================
  302.  
  303. You can set file endings and subdirectories for the source code 
  304. files.
  305.  
  306.  
  307. Edit Main Program
  308. =================
  309.  
  310. You can edit a main program from this option on the Edit menu.
  311.  
  312.  
  313. Modules
  314. =======
  315.  
  316. Each class has a module.  By default there is one module for each 
  317. class.  You can have more than one class in a module.  You can 
  318. enter the Modules dialog box either from the Source menu, or by 
  319. clicking the Filenames button in the Class dialog box and then the 
  320. Modules button.
  321.  
  322.  
  323. Container Classes
  324. =================
  325.  
  326. You can link container classes to 'descriptive tags'.  Container 
  327. classes can be used to manage the cardinality of attributes in 
  328. classes by selecting the related 'descriptive tags' from drop down 
  329. list boxes.  These container classes can be template classes.
  330.  
  331.  
  332. Using a Makefile or a Borland project file
  333. ==========================================
  334.  
  335. If you are using the Borland 3.1 compiler, you can choose between 
  336. using a makefile or a project file (see the Options menu).  When 
  337. code is generated either the makefile is generated, or the Borland 
  338. project file is updated. If you have created an individual project 
  339. file once and you switch to the generate makefile option later, 
  340. please change the name of the makefile in the edit global filenames 
  341. dialog box by pressing the default button. Otherwise you will override 
  342. your project file with the makefile. Make sure that the include path 
  343. is set correctly in Borland┤s IDE.
  344.  
  345.  
  346. Views
  347. =====
  348.  
  349. You can choose subsets of classes and arrange them in separate 
  350. views, in both diagrams.  Views allow you to focus attention on 
  351. aspects of a model.  A class can be in any number of views.  A 
  352. view can be set exclusive, in the Select view dialog box, to isolate 
  353. the classes in the view from the other classes in the model.  When 
  354. a view is selected the name of the view is included in the title bar.
  355.  
  356.  
  357. Overview
  358. ========
  359.  
  360. Use the overview to see a complete diagram when it is too large 
  361. to fit on the screen.  The dark area in the miniaturised overview, 
  362. which is the visible section of the diagram, can be moved by 
  363. dragging it with the mouse.
  364.  
  365.  
  366. Class List
  367. ==========
  368.  
  369. Use the class list to help with navigation in a large diagram.  
  370. Highlight a class in the list to move it into the visible section of the 
  371. diagram.
  372.  
  373.  
  374. Access to Objects in an Objectbase
  375. ==================================
  376.  
  377. Access is based on the level of the user group of the user who 
  378. creates an object.  If another user belongs to a group with a higher 
  379. level, he or she will be allowed access.  Objects to which a user 
  380. does not have access are displayed in grey.  The user can browse 
  381. them, but not make any changes.  You can however create a 
  382. subclass of a class to which you are not allowed access.
  383.  
  384. If you want to test the access mechanism, then follow this 
  385. example.
  386.  
  387. 1.  Create three user groups (for example, Developers, 
  388. Contractors and Guests).  Set the levels for the groups to 
  389. 900, 600 and 500 respectively.
  390.  
  391. 2.  Add three users, one in each group.
  392.  
  393.     user    user group
  394.     ----    ----------
  395.  
  396.     Bill    Developers
  397.     David    Contractors
  398.     Justin    Guests
  399.  
  400. 3.  Logon as David and enter the classes: Wheel and Engine.
  401. 4.  Logon as Justin and enter the classes: Body and Door.
  402. 5.  Logon as Bill and enter the classes: Vehicle, Car and 
  403. Truck, where Vehicle is the superclass of both Car and 
  404. Truck.
  405. 6.  Now logon as each user again and you will see which 
  406. objects they are allowed access to.
  407.  
  408.  
  409. Code Generator Options
  410. ======================
  411.  
  412. There is an option for the code generator that determines the level 
  413. of detail for comments in the generated code.  We suggest you set 
  414. it off for a start.  This will simplify the look of the code you 
  415. generate while testing, which will make it easier to see what the 
  416. code generator does.
  417.  
  418.  
  419. To Logout
  420. =========
  421.  
  422. When you select logout from the File menu, it is a two step 
  423. operation.  The login screen is displayed first, giving the 
  424. choice to enter again as another user, or to logout.
  425.  
  426. If you want to exit directly in one step, press Alt + F4.
  427.  
  428.  
  429. New features not described in the manual
  430. ========================================
  431.  
  432. Quickhelp: Use <alt>+F1 or the Help/Quickhelp menu item to toggle the
  433.        Quickhelp.
  434.  
  435. F5:     this key doesn`t call the quick reference window anymore, but 
  436.     displays the Query window (call the quickref with Shift+F5). 
  437.     You can use the Query window to quickly acces objectbase elements. 
  438.     As windows always appear behind dialogs, the query window might be 
  439.     obscured. 
  440.  
  441.     In the Query window
  442.     -    select the scope of the search,
  443.         ("Definitions" searches all preprocessor definitions) 
  444.     -    enter a search string,
  445.         (you can use "*" as a wildcard at the end of the string). 
  446.     -    click the Display Result button. OEW displays all matches on 
  447.         the left-hand side of the window. 
  448.     -    Select one of these results. OEW displays the source code 
  449.         that will be generated for this element (you can select this
  450.         text and copy it to the clipboard).
  451.     -    Alternatively, you can double-click one of the search 
  452.         results to edit this objectbase element.
  453.  
  454.  
  455. F11:     in an editor entry field or an editor window opened with an Editor 
  456.     button, this key opens the dialog of the objectbase element under
  457.     the cursor. If there are multiple elements of this name (e.g. a
  458.     class and its constructor), you can select which you want to edit.
  459.  
  460.  
  461. Non-modal dialogs: many of OEW`s dialogs can be left open while editing 
  462.     another element.  
  463.  
  464.  
  465. Parser: OEW can recognize #include blockers:
  466.     -    in header files:
  467.         #ifndef INCLUDE_BLOCKER
  468.         #define INCLUDE_BLOCKER
  469.         <header file>
  470.         #endif
  471.         OEW enters these #include blockers into the module
  472.         definition.
  473.  
  474.     -    in include statements
  475.         #ifndef INCLUDE_BLOCKER
  476.         #include include_filename
  477.         #endif
  478.  
  479.         if there is no module in the objectbase with the filename 
  480.         include_filename and the #include blocker INCLUDE_BLOCKER,
  481.         OEW cannot recognize the statements. You either have to
  482.         activate "Import all" or "Execute #includes" in the import 
  483.         dialog, or pre-define modules with the appropriate #include 
  484.         blockers before parsing. 
  485.  
  486.         When parsing, OEW does not enter the #include blockers into 
  487.         a module as it generates them automatically.
  488.  
  489.  
  490. Known manual errata
  491. ===================
  492.  
  493. You cannot paste global datatypes and classes from the clipboard into a 
  494. class.
  495.  
  496.  
  497.  
  498. The Great Unsolved Problem (GUP) example
  499. ========================================
  500.  
  501. The purpose of this example is to show a more complex example.
  502.  
  503. The problem
  504. -----------
  505.  
  506. Imagine a transportation agency with a given number of trucks. Every day 
  507. a number of packages have to be delivered to customers in different cities. 
  508. Each truck can transport several packages depending on their combined volume
  509. and the loading order. The aim is to solve the two problems of the "best 
  510. 3-dimensional packing" and the "best routing" of the trucks simultaneously 
  511. - using the possibility of exchanging packets among the trucks. The 
  512. algorithms are based on both the travelling salesmen algorithms and 
  513. genetic algorithms.
  514.  
  515. GUP was developed by students at Frankfurt University in Germany. From 
  516. the beginning of the project OEW and Borland┤s C++ compiler have been 
  517. used. We would like to thank Professor Wolfgang Koenig and his team for 
  518. allowing us to use the GUP example as a more complex example of an 
  519. OEW objectbase.
  520.  
  521.  
  522. The GUP user interface
  523. ----------------------
  524.  
  525. GUP covers many different algorithms and settings. To run the example, 
  526. try the following combination of parameters:
  527.  
  528.  
  529. 1.    Open the GUP.OEW objectbase.
  530. 2.    Select "Execute" from the "Make menu".
  531. 3.    Choose the menu item "Population New".
  532. 4.    Insert the number of packages (for example: 100) in the "Cities" 
  533.     field and check the "Best Route" and the "Best Packing" boxes 
  534.     in the "World" dialog.
  535. 5.    Enter the number of trucks (for example: 4) and leave the other 
  536.     options unchanged in the "Population" dialog.
  537. 6.    Check the "2-Opt" box and leave the other options unchanged 
  538.     in the "Parameter" dialog.
  539. 7.    Select the menu item "Window Arrange".
  540. 8.    Run the example by choosing the menu item "Population Start".
  541. 9.    Terminate GUP by choosing the menu item "Population Stop", and 
  542.     closing the main window.
  543.  
  544. Please note that it may take a while for menus to drop down when the 
  545. application is running.  Let the application run for a while and you 
  546. will see that the routes and packing arrangement for each of the four 
  547. trucks are updated.  Also the data in the top window is updated, in 
  548. particular the "Best" and "Mean" information in the third line. Watch the 
  549. decreasing "Best" to see how the optimization works.
  550.  
  551.