home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / scase.zip / SCASE.Z / DOC00000.05C < prev    next >
Text File  |  1994-12-28  |  57KB  |  3,100 lines

  1. A+0038757529
  2. +0000000004
  3. +0000000031
  4. +0000000005
  5. scase+0000000000
  6. +0000000019
  7. Booch Class Diagram+0000000001
  8. 1+0000000000
  9. +0000000000
  10. +0000000007
  11. nbhatia+0000000000
  12. MQLclObjSortedCol 4 8 1 -1 -1 -1 -1 0 0 4
  13. MQLclObjPtr 0 8 1 -1 -1 -1 -1 1 0 0
  14. MQLclObjMngr 0 12 1 -1 -1 -1 0 2 0 0
  15. MQLclEdge 36 52 4 -1 -1 -1 -1 3 0 4
  16. MQLclNode 36 41 1 -1 -1 -1 -1 7 1 0
  17. MQLclObj 4 36 3 -1 -1 -1 -1 8 2 4
  18. MQShpAddr 0 12 1 -1 -1 -1 -1 11 3 0
  19. MQTimer 4 22 1 -1 -1 -1 -1 12 3 4
  20. MQStringOnList 0 8 1 -1 -1 -1 -1 13 3 0
  21. MQPixManager 0 4 1 -1 -1 -1 -1 14 3 0
  22. MQPixResource 0 14 2 -1 -1 -1 -1 15 3 0
  23. MQPixmap 0 6 0 -1 -1 -1 -1 17 4 0
  24. MQText 0 6 1 -1 -1 -1 -1 17 4 0
  25. MQTextBlkLine 8 12 1 -1 -1 -1 -1 18 4 4
  26. MQTextLine 4 8 1 -1 -1 -1 -1 19 5 4
  27. MQDrawingSpec 0 30 0 -1 -1 -1 -1 20 5 0
  28. MQEventHandler 4 24 3 -1 -1 -1 -1 20 5 4
  29. MQRsrcMngr 0 4 1 -1 -1 -1 0 23 5 0
  30. MQObjRecData 16 28 2 -1 -1 -1 -1 24 5 4
  31. MQDBManager 0 8 1 -1 -1 -1 -1 26 5 0
  32. MQDBEnv 4 8 1 -1 -1 -1 -1 27 5 4
  33. MQTextTool 0 4 1 -1 -1 -1 -1 28 5 0
  34. MQTextToolData 0 18 0 -1 -1 -1 -1 29 5 0
  35. MQSolidTool 0 4 1 -1 -1 -1 -1 29 5 0
  36. MQSolidToolData 0 22 0 -1 -1 -1 -1 30 5 0
  37. MQLineTool 0 4 1 -1 -1 -1 -1 30 5 0
  38. MQLineToolData 0 16 0 -1 -1 -1 -1 31 5 0
  39. MQWRect 0 16 0 -1 -1 -1 -1 31 5 0
  40. MQWPoint 0 8 0 -1 -1 -1 -1 31 5 0
  41. MQIndexedCol 4 24 1 -1 -1 -1 -1 31 5 4
  42. MQItemOnCol 4 20 2 -1 -1 -1 -1 32 5 4
  43. MQFstPgonShape 0 60 0 -1 -1 -1 -1 34 5 4
  44. MQEdge 4 20 4 -1 -1 -1 -1 34 6 4
  45. MQNode 4 8 1 -1 -1 -1 -1 38 6 4
  46. MQCompoundShape 0 92 0 -1 -1 -1 -1 39 6 4
  47. MQPolygonShape 0 68 0 -1 -1 -1 -1 39 10 4
  48. MQPolyLineShape 0 68 0 -1 -1 -1 -1 39 12 4
  49. MQPolyPntShape 40 64 1 -1 -1 -1 -1 39 14 4
  50. MQWPointOnList 8 12 1 -1 -1 -1 -1 40 16 0
  51. MQLineShape 0 62 0 -1 -1 -1 -1 41 17 4
  52. MQPixShape 0 74 0 -1 -1 -1 -1 41 21 4
  53. MQLabel 0 82 0 -1 -1 -1 -1 41 24 4
  54. MQTextShape 0 82 0 -1 -1 -1 -1 41 25 4
  55. MQArcShape 0 76 0 -1 -1 -1 -1 41 29 4
  56. MQPieShape 0 76 0 -1 -1 -1 -1 41 30 4
  57. MQCircleShape 0 60 0 -1 -1 -1 -1 41 31 4
  58. MQOvalShape 0 60 0 -1 -1 -1 -1 41 32 4
  59. MQRoundRectShape 0 64 0 -1 -1 -1 -1 41 33 4
  60. MQSquareShape 0 60 0 -1 -1 -1 -1 41 34 4
  61. MQRectShape 0 60 0 -1 -1 -1 -1 41 35 4
  62. MQSldRectShape 0 60 0 -1 -1 -1 -1 41 36 4
  63. MQAbsRectShape 0 56 0 -1 -1 -1 -1 41 38 4
  64. MQShapeCollection 0 20 1 -1 -1 -1 -1 41 40 0
  65. MQShapeArray 0 4 1 -1 -1 -1 0 42 40 0
  66. MQShape 4 40 6 -1 -1 -1 -1 43 40 4
  67. MQDrawCanvas 133 143 1 -1 -1 -1 -1 49 40 4
  68. MQZoomWindow 133 309 1 -1 -1 -1 -1 50 40 4
  69. MQPaletteItem 74 84 1 -1 -1 -1 -1 51 42 4
  70. MQTpLvlPaletteWindow 189 209 2 -1 -1 -1 -1 52 43 4
  71. MQPltMouseEvent 0 20 2 -1 -1 -1 -1 54 44 0
  72. MQPaletteWindow 137 189 2 -1 -1 -1 -1 56 44 4
  73. MQListBox 0 171 0 -1 -1 -1 -1 58 45 4
  74. MQBchNoteShp 0 76 0 -1 -1 -1 -1 58 46 4
  75. MQBchCompartment 0 82 0 -1 -1 -1 -1 58 49 4
  76. MQBchPropShp 0 61 0 -1 -1 -1 -1 58 50 4
  77. MQBchDataFlowShp 0 64 0 -1 -1 -1 -1 58 51 4
  78. MQBchMsgShp 0 66 0 -1 -1 -1 -1 58 52 4
  79. MQBchSelfLinkShp 0 97 0 -1 -1 -1 -1 58 53 4
  80. MQBchLinkShp 0 90 0 -1 -1 -1 -1 58 57 4
  81. MQBchObjShp 0 76 0 -1 -1 -1 -1 58 59 4
  82. MQBchCatShp 0 80 0 -1 -1 -1 -1 58 62 4
  83. MQBchCatSpec 0 53 0 -1 -1 -1 -1 58 64 4
  84. MQBchClsRelShp 0 96 0 -1 -1 -1 -1 58 66 4
  85. MQBchClsRelSpec 0 140 0 -1 -1 -1 -1 58 68 4
  86. MQBchClsShp 0 98 0 -1 -1 -1 -1 58 79 4
  87. MQBchClsSortedCol 0 8 0 -1 -1 -1 -1 58 83 4
  88. MQBchClsSpec 0 127 0 -1 -1 -1 -1 58 84 4
  89. MQBchClsOpCol 0 6 1 -1 -1 -1 -1 58 95 0
  90. MQBchClsOp 0 62 1 -1 -1 -1 -1 59 95 0
  91. MQBchClsAttrCol 0 6 1 -1 -1 -1 -1 60 101 0
  92. MQBchClsAttr 0 62 1 -1 -1 -1 -1 61 101 0
  93. ZZendMark -1 -1 -1 -1 -1 -1 -1 62 107 0
  94. aZZcMQLclObjSortedColOrg[1
  95. aZZsMQLclObjSortedColOrg[1
  96. AZZaMQLclObjHashTbl[1
  97. aZZsMQLclGraph[1
  98. aZZrMQLclGraph[1
  99. aZZyMQLclGraph[1
  100. aZZxMQLclGraph[1
  101. aZZeMQLclGraph[1
  102. aZZfMQLclObj2HashTbl[1
  103. aZZfMQLclObjHashTbl[1
  104. aZZcMQShpAddrCol[1
  105. aZZsMQShpAddrCol[1
  106. aZZfMQTimerList[1
  107. aZZfMQStringQ[1
  108. aZZcMQPixCol[1
  109. aZZbMQPixCol[1
  110. aZZfMQPixCol[1
  111. aZZcMQTextLineCol[1
  112. aZZsMQTextLineCol[1
  113. aZZnMQTextLineBuf[1
  114. aZZsMQEhTree[1
  115. aZZcMQEhTree[1
  116. aZZpMQEhTree[1
  117. AZZaMQRsrcHashTbl[1
  118. aZZfMQRsrc2HashTbl[1
  119. aZZfMQRsrcHashTbl[1
  120. aZZcMQDBEnvCol[1
  121. aZZsMQDBEnvCol[1
  122. aZZfMQTxtTlData[1
  123. aZZfMQSldTlData[1
  124. aZZfMQLnTlData[1
  125. aZZcMQIndexedCollect[1
  126. aZZbMQIndexedCollect[1
  127. aZZfMQIndexedCollect[1
  128. aZZsMQGraph[1
  129. aZZrMQGraph[1
  130. aZZyMQGraph[1
  131. aZZxMQGraph[1
  132. aZZeMQGraph[1
  133. aZZcMQPolyPntList[1
  134. aZZsMQPolyPntList[1
  135. aZZcMQShapeCollectionOrg[1
  136. AZZaMQShpArr[1
  137. aZZfMQShapeCollectionOrg[1
  138. aZZbMQShapeCollectionOrg[1
  139. aZZsMQShpTree[1
  140. aZZcMQShpTree[1
  141. aZZpMQShapeCollectionOrg[1
  142. aZZpMQShpTree[1
  143. aZZbMQZoomLink[1
  144. aZZfMQZoomLink[1
  145. aZZfMQPltItemCol[1
  146. aZZcMQPltCol[1
  147. aZZcMQPltEvntQ[1
  148. aZZbMQPltEvntQ[1
  149. aZZfMQPltEvntQ[1
  150. aZZbMQPltCol[1
  151. aZZfMQPltCol[1
  152. aZZcMQBchClsOps[1
  153. aZZsMQBchClsOps[1
  154. aZZcMQBchClsAttrs[1
  155. aZZsMQBchClsAttrs[1
  156. 5 4 0 ZZinherit
  157. 5 4 0 ZZinherit
  158. 12 30 1 Name
  159. 11 8 1 Pixmap
  160. 14 4 0 ZZinherit
  161. 50 0 0 ZZinherit
  162. 54 4 0 ZZinherit
  163. 27 40 1 DrawRect
  164. 27 56 1 InvalidateRect
  165. 52 72 1 ShpCol
  166. 37 40 0 ZZinherit
  167. 23 64 1 SldTl
  168. 37 40 0 ZZinherit
  169. 25 64 1 LnTl
  170. 54 4 0 ZZinherit
  171. 27 48 1 DrawRect
  172. 28 0 0 ZZinherit
  173. 54 4 0 ZZinherit
  174. 25 40 1 LnTl
  175. 28 44 1 Origin
  176. 28 52 1 End
  177. 51 0 0 ZZinherit
  178. 11 56 1 Pixmap
  179. 28 62 1 Location
  180. 42 0 0 ZZinherit
  181. 51 0 0 ZZinherit
  182. 12 56 1 Txt
  183. 21 62 1 TxtTl
  184. 28 66 1 Location
  185. 44 0 0 ZZinherit
  186. 46 0 0 ZZinherit
  187. 46 0 0 ZZinherit
  188. 50 0 0 ZZinherit
  189. 50 0 0 ZZinherit
  190. 49 0 0 ZZinherit
  191. 50 0 0 ZZinherit
  192. 51 0 0 ZZinherit
  193. 23 56 1 SldTl
  194. 54 4 0 ZZinherit
  195. 27 40 1 MathRect
  196. 42 137 1 Display
  197. 40 219 1 ZoomPix
  198. 40 0 0 ZZinherit
  199. 60 137 0 ZZinherit
  200. 7 157 1 PltTimer
  201. 29 4 0 ZZinherit
  202. 31 0 0 ZZinherit
  203. 28 60 1 Origin
  204. 28 68 1 End
  205. 41 0 0 ZZinherit
  206. 31 0 0 ZZinherit
  207. 39 0 0 ZZinherit
  208. 39 0 0 ZZinherit
  209. 32 4 0 ZZinherit
  210. 46 20 0 ZZinherit
  211. 28 81 1 StartPt
  212. 28 89 1 StopPt
  213. 32 4 0 ZZinherit
  214. 39 20 0 ZZinherit
  215. 33 4 0 ZZinherit
  216. 31 8 0 ZZinherit
  217. 12 68 1 Def
  218. 33 4 0 ZZinherit
  219. 49 8 0 ZZinherit
  220. 4 36 0 ZZinherit
  221. 12 45 1 Def
  222. 32 4 0 ZZinherit
  223. 39 20 0 ZZinherit
  224. 3 36 0 ZZinherit
  225. 12 54 1 Def
  226. 14 64 1 SrcCard
  227. 14 72 1 TrgCard
  228. 14 80 1 SrcRoles
  229. 14 88 1 TrgRoles
  230. 14 96 1 SrcKey
  231. 14 104 1 TrgKey
  232. 14 112 1 SrcCons
  233. 14 120 1 TrgCons
  234. 14 136 1 UserImplementation
  235. 33 4 0 ZZinherit
  236. 31 8 0 ZZinherit
  237. 28 68 1 Origin
  238. 28 76 1 End
  239. 0 4 0 ZZinherit
  240. 4 36 0 ZZinherit
  241. 12 43 1 Def
  242. 12 49 1 Resp
  243. 79 55 1 Attributes
  244. 77 61 1 Operations
  245. 14 71 1 Cons
  246. 14 79 1 Param
  247. 14 87 1 Card
  248. 14 95 1 SpCmpl
  249. 14 103 1 HdrFile
  250. 14 111 1 BodyFile
  251. 14 8 1 Name
  252. 12 12 1 Def
  253. 14 22 1 RetClass
  254. 14 30 1 Args
  255. 14 38 1 Qual
  256. 14 58 1 UserImplementation
  257. 14 8 1 Name
  258. 12 12 1 Def
  259. 14 22 1 Class
  260. 14 30 1 Qual
  261. 14 40 1 DefExpr
  262. 14 58 1 UserImplementation
  263. -1 -1 -1 ZZendMark
  264. 162992418 15 30 1
  265. 40 6.000000 4.500000 1 13 0.100000
  266. 162994250 52 20 1
  267. 1332152118
  268. 32
  269. 162989814 52 20 1
  270. 635371606
  271. 21
  272. 155653936 -1 1 1
  273.  
  274. 1348934744 -1 1 1
  275.  
  276. 1348931504 -1 1 1
  277.  
  278. 155650384 -1 1 1
  279.  
  280. 155648440 -1 1 1
  281.  
  282. 155655148 -1 1 1
  283.  
  284. 1348935368 -1 1 1
  285.  
  286. 155656120 -1 1 1
  287.  
  288. 155649472 -1 1 1
  289.  
  290. 1348931324 -1 1 1
  291.  
  292. 155648512 -1 1 1
  293.  
  294. 155650552 -1 1 1
  295.  
  296. 155648644 -1 1 1
  297.  
  298. 1348931924 -1 1 1
  299.  
  300. 1348934492 -1 1 1
  301.  
  302. 1348934324 -1 1 1
  303.  
  304. 155652796 -1 1 1
  305.  
  306. 1348934636 -1 2 1
  307. }
  308. 1348934480 -1 1 1
  309.  
  310. 1348934912 -1 1 1
  311.  
  312. 1348934984 -1 2 1
  313. {
  314. 1348935224 -1 1 1
  315.  
  316. 155655772 -1 1 1
  317.  
  318. 1348934684 -1 1 1
  319.  
  320. 1348935620 -1 1 1
  321.  
  322. 1348935164 -1 1 1
  323.  
  324. 1348932164 -1 2 1
  325. }
  326. 1348933376 -1 1 1
  327.  
  328. 1348935464 -1 1 1
  329.  
  330. 1348934720 -1 1 1
  331.  
  332. 1348935440 -1 1 1
  333.  
  334. 1348934960 -1 1 1
  335.  
  336. 1348934504 -1 1 1
  337.  
  338. 1348935656 -1 2 1
  339. {
  340. 155654908 -1 1 1
  341.  
  342. 1348934660 -1 1 1
  343.  
  344. 1348935512 -1 1 1
  345.  
  346. 1348933184 -1 2 1
  347. }
  348. 1348935428 -1 1 1
  349.  
  350. 1348934804 -1 1 1
  351.  
  352. 155654056 -1 1 1
  353.  
  354. 1348932836 -1 1 1
  355.  
  356. 155651716 -1 1 1
  357.  
  358. 1348930460 -1 1 1
  359.  
  360. 1348934516 -1 2 1
  361. {
  362. 155653276 -1 1 1
  363.  
  364. 155654248 -1 1 1
  365.  
  366. 155654860 -1 1 1
  367.  
  368. 155655028 -1 1 1
  369.  
  370. 155654884 13 12 1
  371. 155654884
  372. 155654884 14 8 1
  373. 162993166
  374. 1482097366 22 18 1
  375. 1 8 8 12 50331903 201326591 1
  376. 1482096758 -1 53 1
  377. S-CASE allows you to generate C++ code automatically
  378. 155655196 13 12 1
  379. 1348935248
  380. 155655196 14 8 1
  381. 162994678
  382. 155648056 13 12 1
  383. 155650828
  384. 155648056 14 8 1
  385. 157751654
  386. 1108283974 -1 53 1
  387. 8) Turn on the "Generate Clean Code" option from the
  388. 155653564 13 12 1
  389. 155655940
  390. 155653564 14 8 1
  391. 1108282674
  392. 1336346206 42 82 1
  393. 28 0 0
  394. 1336346206 51 56 1
  395. 1336346206 54 40 1
  396. 162990358 1482104222 0 0 162994250 0
  397. 0 0
  398. 1336346246 27 16 1
  399. 21249 916 40323 32998
  400. 1336346262 12 6 1
  401. 1348933640
  402. 13
  403. 1336346268 21 4 1
  404. 641144094
  405. 1336346272 28 8 1
  406. 21249 916
  407. 1336345962 -1 53 1
  408. from your system's model. It also allows you to keep
  409. 1348935248 13 12 1
  410. 1348934096
  411. 1348935248 14 8 1
  412. 162990590
  413. 1482102902 42 82 1
  414. 28 0 0
  415. 1482102902 51 56 1
  416. 1482102902 54 40 1
  417. 1332152018 1336345722 0 0 162994250 0
  418. 0 0
  419. 1482102942 27 16 1
  420. 453646 1084 482632 35750
  421. 1482102958 12 6 1
  422. 155655544
  423. 20
  424. 1482102964 21 4 1
  425. 641144094
  426. 1482102968 28 8 1
  427. 453646 1084
  428. 155650828 13 12 1
  429. 155656144
  430. 155650828 14 8 1
  431. 157751526
  432. 1108285238 -1 50 1
  433. Options menu. Regenerate the code for one or more
  434. 155655940 13 12 1
  435. 155652928
  436. 155655940 14 8 1
  437. 1108279374
  438. 162992650 22 18 1
  439. 1 8 8 9 117440512 201326591 0
  440. 162993166 -1 43 1
  441. - Open the class diagram "Shape Hierarchy"
  442. 162994678 -1 53 1
  443. your model in sync with your code. This section is a
  444. 1348934096 13 12 1
  445. 1348933316
  446. 1348934096 14 8 1
  447. 1348934744
  448. 157751654 -1 34 1
  449. will preserve the modified order.
  450. 155656144 13 12 1
  451. 155652232
  452. 155656144 14 8 1
  453. 157751730
  454. 1108282674 -1 53 1
  455. classes. Notice that the code generator now produces
  456. 155652928 13 12 1
  457. 155648284
  458. 155652928 14 8 1
  459. 1108283330
  460. 162990746 62 76 1
  461. 162990746 31 60 1
  462. 162990746 50 60 1
  463. 162990746 51 56 1
  464. 162990746 54 40 1
  465. 162988750 641141122 0 1099366454 162989814 0
  466. 0 0
  467. 162990786 27 16 1
  468. -2500 -5000 2500 5000
  469. 162990802 23 4 1
  470. 162989586
  471. 162990806 28 8 1
  472. 0 0
  473. 162990814 28 8 1
  474. 0 0
  475. 1348933640 13 12 1
  476. 1348932896
  477. 1348933640 14 8 1
  478. 162989882
  479. 162990590 -1 52 1
  480. quick tutorial on C++ code generation using S-CASE.
  481. 1348933316 13 12 1
  482. 1348933352
  483. 1348933316 14 8 1
  484. 162993646
  485. 155655544 13 12 1
  486. 155651068
  487. 155655544 14 8 1
  488. 1336346046
  489. 157751526 -1 64 1
  490. 3) Note that "Has" relationships in the class diagram appear in
  491. 155652232 13 12 1
  492. 155649244
  493. 155652232 14 8 1
  494. 157751070
  495. 1108279374 -1 52 1
  496. two additional files for each class with extensions
  497. 155648284 13 12 1
  498. 155648296
  499. 155648284 14 8 1
  500. 1108281470
  501. 162990442 24 22 1
  502. 1 1 2 0 117440512 2 201326591 201326591
  503. 162990358 42 82 1
  504. 28 0 0
  505. 162990358 51 56 1
  506. 162990358 54 40 1
  507. 162991674 1336346206 0 0 162994250 0
  508. 0 0
  509. 162990398 27 16 1
  510. 48333 916 81567 31248
  511. 162990414 12 6 1
  512. 155653384
  513. 23
  514. 162990420 21 4 1
  515. 641144094
  516. 162990424 28 8 1
  517. 48333 916
  518. 1348932896 13 12 1
  519. 1348932644
  520. 1348932896 14 8 1
  521. 162993458
  522. 162994250 52 20 1
  523. 1332152118
  524. 32
  525. 1348933352 13 12 1
  526. 155652964
  527. 1348933352 14 8 1
  528. 162991878
  529. 1336345722 42 82 1
  530. 28 0 0
  531. 1336345722 51 56 1
  532. 1336345722 54 40 1
  533. 1482102902 162990110 0 0 162994250 0
  534. 0 0
  535. 1336345762 27 16 1
  536. 451046 916 453711 15915
  537. 1336345778 12 6 1
  538. 1348933328
  539. 1
  540. 1336345784 21 4 1
  541. 162994434
  542. 1336345788 28 8 1
  543. 451046 916
  544. 155651068 13 12 1
  545. 155650840
  546. 155651068 14 8 1
  547. 1336345102
  548. 157751730 -1 62 1
  549. the attribute list of the associated class specification. Try
  550. 155649244 13 12 1
  551. 155649484
  552. 155649244 14 8 1
  553. 157745582
  554. 1108283330 -1 51 1
  555. ".hcl" and ".ccl". These files are the same as the
  556. 155648296 13 12 1
  557. 155648380
  558. 155648296 14 8 1
  559. 1108283690
  560. 162993982 64 61 1
  561. F
  562. 162993982 31 60 1
  563. 162993982 50 60 1
  564. 162993982 51 56 1
  565. 162993982 54 40 1
  566. 1482098986 1322189382 0 0 162989814 0
  567. 0 0
  568. 162994022 27 16 1
  569. -1000 -1000 1000 1000
  570. 162994038 23 4 1
  571. 157751138
  572. 162989882 -1 20 1
  573. diagram to open it.
  574. 1348932644 13 12 1
  575. 1348931168
  576. 1348932644 14 8 1
  577. 1348931504
  578. 162993646 -1 59 1
  579. Please follow the steps in this tutorial sequentially. You
  580. 1336346046 -1 35 1
  581. between the header and body files.
  582. 155650840 13 12 1
  583. 155650636
  584. 155650840 14 8 1
  585. 1336344802
  586. 157751070 -1 65 1
  587. changing the order of attributes and relations through the class
  588. 155649484 13 12 1
  589. 155654800
  590. 155649484 14 8 1
  591. 157751286
  592. 1108281470 -1 57 1
  593. generated ".h" and ".cc" files except that the "-MQBeg-"
  594. 155648380 13 12 1
  595. 155653024
  596. 155648380 14 8 1
  597. 1108286006
  598. 155653384 13 12 1
  599. 155650540
  600. 155653384 14 8 1
  601. 1332155974
  602. 162993458 -1 55 1
  603. a) First choose Project Manager from the Project menu.
  604. 1348931168 13 12 1
  605. 1348934012
  606. 1348931168 14 8 1
  607. 1099371638
  608. 162991878 -1 57 1
  609. may want to print these instructions for easy reference.
  610. 1348933328 13 12 1
  611. 1348933328
  612. 1348933328 14 8 1
  613. 162989838
  614. 162994434 22 18 1
  615. 1 8 8 12 50331903 201326591 1
  616. 1336345102 -1 61 1
  617. Now that you know the basic concepts behind code generation,
  618. 155650636 13 12 1
  619. 155650144
  620. 155650636 14 8 1
  621. 155650384
  622. 157745582 -1 62 1
  623. specification dialog box. See how the code generator reflects
  624. 155654800 13 12 1
  625. 155652256
  626. 155654800 14 8 1
  627. 155648440
  628. 1108283690 -1 42 1
  629. and "-MQEnd-" comments are removed. These
  630. 155653024 13 12 1
  631. 155652976
  632. 155653024 14 8 1
  633. 1108287258
  634. 162989586 24 22 1
  635. 1 1 2 0 117440512 2 201326591 201326591
  636. 162991674 42 82 1
  637. 28 0 0
  638. 162991674 51 56 1
  639. 162991674 54 40 1
  640. 1322195934 162990358 0 0 162994250 0
  641. 0 0
  642. 162991714 27 16 1
  643. 45748 916 48413 16915
  644. 162991730 12 6 1
  645. 1348933544
  646. 1
  647. 162991736 21 4 1
  648. 157745194
  649. 162991740 28 8 1
  650. 45748 916
  651. 155650540 13 12 1
  652. 155650252
  653. 155650540 14 8 1
  654. 1332156350
  655. 162989814 52 20 1
  656. 635371606
  657. 21
  658. 1348934012 13 12 1
  659. 1348931180
  660. 1348934012 14 8 1
  661. 157751594
  662. 162990110 42 82 1
  663. 28 0 0
  664. 162990110 51 56 1
  665. 162990110 54 40 1
  666. 1336345722 162991218 0 0 162994250 0
  667. 0 0
  668. 162990150 27 16 1
  669. 394059 917 401805 56332
  670. 162990166 12 6 1
  671. 1348931216
  672. 5
  673. 162990172 21 4 1
  674. 162993398
  675. 162990176 28 8 1
  676. 394059 917
  677. 1336344802 -1 60 1
  678. it is time explore on your own. Here are a few suggestions:
  679. 155650144 13 12 1
  680. 155649904
  681. 155650144 14 8 1
  682. 1336345658
  683. 157751286 -1 38 1
  684. these changes into your source files.
  685. 155652256 13 12 1
  686. 155655112
  687. 155652256 14 8 1
  688. 157753278
  689. 1108286006 -1 58 1
  690. "clean code" files are lot more readable. However, if you
  691. 155652976 13 12 1
  692. 155650648
  693. 155652976 14 8 1
  694. 1108284806
  695. 162988742 74 98 1
  696. 0 0 0
  697. 162988742 33 8 1
  698. 0
  699. 162988750 31 60 1
  700. 162988750 50 60 1
  701. 162988750 51 56 1
  702. 162988750 54 40 1
  703. 1107230826 162990746 0 1107235130 162989814 0
  704. 0 0
  705. 162988790 27 16 1
  706. -5000 -5000 2276 5000
  707. 162988806 23 4 1
  708. 1107231034
  709. 162988810 28 8 1
  710. 0 0
  711. 162988818 28 8 1
  712. 0 0
  713. 1099366454 41 82 1
  714. 1099366454 42 82 1
  715. 28 0 0
  716. 1099366454 51 56 1
  717. 1099366454 54 40 1
  718. 0 0 1099366454 0 0 162990746
  719. 0 30001
  720. 1099366494 27 16 1
  721. -2500 -4000 2500 5000
  722. 1099366510 12 6 1
  723. 0
  724. 0
  725. 1099366516 21 4 1
  726. 1107235566
  727. 1099366520 28 8 1
  728. -2500 -4000
  729. 1332155974 -1 36 1
  730.         ||| = implementation access
  731. 155650252 13 12 1
  732. 155650036
  733. 155650252 14 8 1
  734. 1332152410
  735. 1099371638 -1 56 1
  736. b) Make sure that the category "4. C++ Code Generation"
  737. 1348931180 13 12 1
  738. 1348934108
  739. 1348931180 14 8 1
  740. 1322194866
  741. 162989838 -1 22 1
  742. - Other things to try
  743. 1332152118 42 82 1
  744. 28 0 0
  745. 1332152118 51 56 1
  746. 1332152118 54 40 1
  747. 1108286910 1332150958 0 0 162994250 0
  748. 0 0
  749. 1332152158 27 16 1
  750. 544418 1166 573404 35082
  751. 1332152174 12 6 1
  752. 155648416
  753. 20
  754. 1332152180 21 4 1
  755. 641144094
  756. 1332152184 28 8 1
  757. 544418 1166
  758. 155649904 13 12 1
  759. 155649784
  760. 155649904 14 8 1
  761. 1336348770
  762. 635371598 70 80 1
  763. 0 0
  764. 635371598 33 8 1
  765. 0
  766. 635371606 49 60 1
  767. 635371606 50 60 1
  768. 635371606 51 56 1
  769. 635371606 54 40 1
  770. 1337393846 1337393266 0 1332157682 162989814 0
  771. 0 0
  772. 635371646 27 16 1
  773. -2500 -5000 2500 5000
  774. 635371662 23 4 1
  775. 162988494
  776. 155655112 13 12 1
  777. 155653036
  778. 155655112 14 8 1
  779. 157751466
  780. 1108287258 -1 59 1
  781. edit them, the code generator will NOT be able to preserve
  782. 155650648 13 12 1
  783. 155655244
  784. 155650648 14 8 1
  785. 155655148
  786. 157751138 24 22 1
  787. 1 1 2 0 117440512 2 201326591 201326591
  788. 1348933544 13 12 1
  789. 1348933544
  790. 1348933544 14 8 1
  791. 1107231926
  792. 157745194 22 18 1
  793. 1 8 8 12 50331903 201326591 1
  794. 1332156350 -1 61 1
  795. a) If there is a line across the pencil icon on the tool bar
  796. 155650036 13 12 1
  797. 155649832
  798. 155650036 14 8 1
  799. 1332154062
  800. 157751594 -1 57 1
  801. is visible on the left hand side of the project manager.
  802. 1348934108 13 12 1
  803. 1348935632
  804. 1348934108 14 8 1
  805. 1348935368
  806. 1348931216 13 12 1
  807. 1348933364
  808. 1348931216 14 8 1
  809. 635374990
  810. 162993398 22 18 1
  811. 1 1 8 9 117440512 201326591 1
  812. 1336345658 -1 61 1
  813. 1) To keep your model and code in sync, it is important that
  814. 155649784 13 12 1
  815. 155649544
  816. 155649784 14 8 1
  817. 1336346142
  818. 157753278 -1 56 1
  819. 4) Try changing the order of methods in a class through
  820. 155653036 13 12 1
  821. 155649676
  822. 155653036 14 8 1
  823. 157751702
  824. 1108284806 -1 14 1
  825. your changes.
  826. 155655244 13 12 1
  827. 155656096
  828. 155655244 14 8 1
  829. 1108282310
  830. 1322189382 64 61 1
  831. A
  832. 1322189382 31 60 1
  833. 1322189382 50 60 1
  834. 1322189382 51 56 1
  835. 1322189382 54 40 1
  836. 162993982 1108285694 0 0 162989814 0
  837. 0 0
  838. 1322189422 27 16 1
  839. -1000 -1000 1000 1000
  840. 1322189438 23 4 1
  841. 1108286534
  842. 1322195934 42 82 1
  843. 28 0 0
  844. 1322195934 51 56 1
  845. 1322195934 54 40 1
  846. 1107235714 162991674 0 0 162994250 0
  847. 0 0
  848. 1322195974 27 16 1
  849. 94083 832 128733 34497
  850. 1322195990 12 6 1
  851. 155648080
  852. 24
  853. 1322195996 21 4 1
  854. 641144094
  855. 1322196000 28 8 1
  856. 94083 832
  857. 1332152410 -1 47 1
  858. of the "Shape Hierarchy" class diagram, choose
  859. 155649832 13 12 1
  860. 155649652
  861. 155649832 14 8 1
  862. 1332153190
  863. 1322194866 -1 65 1
  864. (If not double-click the category called "Tutorial" to open it.)
  865. 1348935632 13 12 1
  866. 1348935500
  867. 1348935632 14 8 1
  868. 1107231730
  869. 162991218 42 82 1
  870. 28 0 0
  871. 162991218 51 56 1
  872. 162991218 54 40 1
  873. 162990110 163518446 0 0 162994250 0
  874. 0 0
  875. 162991258 27 16 1
  876. 391226 813 393308 31395
  877. 162991274 12 6 1
  878. 1348933304
  879. 1
  880. 162991280 21 4 1
  881. 641144094
  882. 162991284 28 8 1
  883. 391226 813
  884. 1348933364 13 12 1
  885. 1348932464
  886. 1348933364 14 8 1
  887. 157751326
  888. 1336348770 -1 57 1
  889. you make all architectural changes through S-CASE. Hence
  890. 155649544 13 12 1
  891. 155649256
  892. 155649544 14 8 1
  893. 1336345898
  894. 157751466 -1 56 1
  895. the class specification dialog box. Regenerate the code
  896. 155649676 13 12 1
  897. 155648992
  898. 155649676 14 8 1
  899. 155656120
  900. 155648416 13 12 1
  901. 155652652
  902. 155648416 14 8 1
  903. 155655964
  904. 155656096 13 12 1
  905. 155648416
  906. 155656096 14 8 1
  907. 1108283070
  908. 1107235566 22 18 1
  909. 1 8 8 9 117440512 201326591 0
  910. 1107231926 -1 22 1
  911. - Explore the classes
  912. 1332154062 -1 53 1
  913. Check Out from the Project menu of the diagram. This
  914. 155649652 13 12 1
  915. 155649208
  916. 155649652 14 8 1
  917. 155649472
  918. 641144094 22 18 1
  919. 16 8 8 9 117440512 201326591 1
  920. 1348935500 13 12 1
  921. 155648128
  922. 1348935500 14 8 1
  923. 1322195766
  924. 635374990 -1 65 1
  925. // -MQEnd- [Module_Includes] [Rectangle_cc] <0000005B.00000000> 
  926. 1348932464 13 12 1
  927. 1348933664
  928. 1348932464 14 8 1
  929. 1107235606
  930. 1336346142 -1 60 1
  931. adding, deleting or changing of classes, method signatures,
  932. 155649256 13 12 1
  933. 155649136
  934. 155649256 14 8 1
  935. 1336346390
  936. 157751702 -1 25 1
  937. and observe the changes.
  938. 155648992 13 12 1
  939. 155656000
  940. 155648992 14 8 1
  941. 157751010
  942. 1108282310 -1 56 1
  943. The extensions of the "clean code" files can be changed
  944. 1107231034 24 22 1
  945. 1 1 2 2 117440512 2 201326591 201326591
  946. 155648080 13 12 1
  947. 155648344
  948. 155648080 14 8 1
  949. 1108286462
  950. 1332153190 -1 36 1
  951. will allow you to edit the diagram.
  952. 155649208 13 12 1
  953. 155649028
  954. 155649208 14 8 1
  955. 1332156718
  956. 1107231730 -1 52 1
  957. c) Now select the category "4. C++ Code Generation"
  958. 155648128 13 12 1
  959. 155648392
  960. 155648128 14 8 1
  961. 1108286226
  962. 1348933304 13 12 1
  963. 1348933304
  964. 1348933304 14 8 1
  965. 1107231846
  966. 157751326 -1 74 1
  967. // -MQBeg- [Module_Includes] [Rectangle_cc] <0000005B.00000000> Retained!
  968. 1348933664 13 12 1
  969. 1348934672
  970. 1348933664 14 8 1
  971. 1107231078
  972. 1336345898 -1 60 1
  973. attributes, relations etc. should be done through the tool.
  974. 155649136 13 12 1
  975. 155648884
  976. 155649136 14 8 1
  977. 1336344734
  978. 1108286910 42 82 1
  979. 28 0 0
  980. 1108286910 51 56 1
  981. 1108286910 54 40 1
  982. 1332153310 1332152118 0 0 162994250 0
  983. 0 0
  984. 1108286950 27 16 1
  985. 1166 1000 4831 25915
  986. 1108286966 12 6 1
  987. 155649760
  988. 1
  989. 1108286972 21 4 1
  990. 1337400862
  991. 1108286976 28 8 1
  992. 1166 1000
  993. 155656000 13 12 1
  994. 155651032
  995. 155656000 14 8 1
  996. 157745514
  997. 1108283070 -1 57 1
  998. by choosing "Source File Extensions..." from the Options
  999. 1107230818 74 98 1
  1000. 0 0 1
  1001. 1107230818 33 8 1
  1002. 0
  1003. 1107230826 31 60 1
  1004. 1107230826 50 60 1
  1005. 1107230826 51 56 1
  1006. 1107230826 54 40 1
  1007. 1108281942 162988750 0 1108281222 162989814 0
  1008. 0 0
  1009. 1107230866 27 16 1
  1010. -5000 -5000 2276 5000
  1011. 1107230882 23 4 1
  1012. 1108282882
  1013. 1107230886 28 8 1
  1014. 0 0
  1015. 1107230894 28 8 1
  1016. 0 0
  1017. 1107235130 41 82 1
  1018. 1107235130 42 82 1
  1019. 28 0 1
  1020. 1107235130 51 56 1
  1021. 1107235130 54 40 1
  1022. 0 0 1107235130 0 0 162988750
  1023. 0 30001
  1024. 1107235170 27 16 1
  1025. -3500 -4000 2276 5000
  1026. 1107235186 12 6 1
  1027. 0
  1028. 0
  1029. 1107235192 21 4 1
  1030. 1108284270
  1031. 1107235196 28 8 1
  1032. -3500 500
  1033. 1107235714 42 82 1
  1034. 28 0 0
  1035. 1107235714 51 56 1
  1036. 1107235714 54 40 1
  1037. 1108284090 1322195934 0 0 162994250 0
  1038. 0 0
  1039. 1107235754 27 16 1
  1040. 91166 916 93831 23165
  1041. 1107235770 12 6 1
  1042. 155648740
  1043. 1
  1044. 1107235776 21 4 1
  1045. 1108285390
  1046. 1107235780 28 8 1
  1047. 91166 916
  1048. 155648344 13 12 1
  1049. 155648560
  1050. 155648344 14 8 1
  1051. 1108285334
  1052. 1332150958 42 82 1
  1053. 28 0 0
  1054. 1332150958 51 56 1
  1055. 1332150958 54 40 1
  1056. 1332152118 1108284546 0 0 162994250 0
  1057. 0 0
  1058. 1332150998 27 16 1
  1059. 541089 1166 543754 21415
  1060. 1332151014 12 6 1
  1061. 155650600
  1062. 1
  1063. 1332151020 21 4 1
  1064. 1332153730
  1065. 1332151024 28 8 1
  1066. 541089 1166
  1067. 155649028 13 12 1
  1068. 155648788
  1069. 155649028 14 8 1
  1070. 1332151886
  1071. 1322195766 -1 52 1
  1072. by clicking it. The "Shape Hierarchy" class diagram
  1073. 155648392 13 12 1
  1074. 155648608
  1075. 155648392 14 8 1
  1076. 1108285114
  1077. 163518446 42 82 1
  1078. 28 0 0
  1079. 163518446 51 56 1
  1080. 163518446 54 40 1
  1081. 162991218 1108287398 0 0 162994250 0
  1082. 0 0
  1083. 163518486 27 16 1
  1084. 408158 833 437144 34415
  1085. 163518502 12 6 1
  1086. 155648152
  1087. 20
  1088. 163518508 21 4 1
  1089. 641144094
  1090. 163518512 28 8 1
  1091. 408158 833
  1092. 1107235606 -1 19 1
  1093. #include <stdio.h>
  1094. 1348934672 13 12 1
  1095. 1348931216
  1096. 1348934672 14 8 1
  1097. 1107233386
  1098. 1336346390 -1 54 1
  1099. This allows the code generator to output the modified
  1100. 155648884 13 12 1
  1101. 155648656
  1102. 155648884 14 8 1
  1103. 1336345626
  1104. 157751010 -1 58 1
  1105. 5) The code generator can be configured to output methods
  1106. 155651032 13 12 1
  1107. 155651824
  1108. 155651032 14 8 1
  1109. 157751222
  1110. 1108286534 24 22 1
  1111. 1 1 2 0 117440512 2 201326591 201326591
  1112. 1108286462 -1 47 1
  1113. Run the sample application to see the results.
  1114. 155648560 13 12 1
  1115. 155648764
  1116. 155648560 14 8 1
  1117. 1108283846
  1118. 1332156718 -1 52 1
  1119. b) The "Shape Hierarchy" class diagram contains two
  1120. 155648788 13 12 1
  1121. 155648584
  1122. 155648788 14 8 1
  1123. 1332150314
  1124. 1108286226 -1 56 1
  1125. contained in this category should now be visible on the
  1126. 155648608 13 12 1
  1127. 155648812
  1128. 155648608 14 8 1
  1129. 1348931324
  1130. 1107231846 -1 56 1
  1131. c) Add 3 #include lines to rectangle.cc as shown below:
  1132. 1107231078 -1 19 1
  1133. #include "shape.h"
  1134. 1336344734 -1 64 1
  1135. architecture into your source files correctly, while preserving
  1136. 155648656 13 12 1
  1137. 155648176
  1138. 155648656 14 8 1
  1139. 155648512
  1140. 157745514 -1 64 1
  1141. first followed by the attributes or vice versa. This option can
  1142. 155651824 13 12 1
  1143. 155653552
  1144. 155651824 14 8 1
  1145. 157753218
  1146. 1108285674 72 96 1
  1147. 0 0 5
  1148. 1108285674 32 20 1
  1149. 0 0 0 0
  1150. 1108285694 39 62 1
  1151. 0 129
  1152. 1108285694 54 40 1
  1153. 1322189382 1108280898 0 0 162989814 0
  1154. 0 0
  1155. 1108285734 25 4 1
  1156. 1108280690
  1157. 1108285738 28 8 1
  1158. 0 0
  1159. 1108285746 28 8 1
  1160. 0 0
  1161. 155648740 13 12 1
  1162. 155648740
  1163. 155648740 14 8 1
  1164. 1108282826
  1165. 1108285390 22 18 1
  1166. 1 8 8 12 50331903 201326591 1
  1167. 1108285334 -1 52 1
  1168. a) We have already provided implementations for the
  1169. 155648764 13 12 1
  1170. 155649004
  1171. 155648764 14 8 1
  1172. 1108282786
  1173. 1332151886 -1 52 1
  1174. classes. Shape is an abstract class that contains a
  1175. 155648584 13 12 1
  1176. 155648368
  1177. 155648584 14 8 1
  1178. 1332157554
  1179. 1108285114 -1 40 1
  1180. right hand side of the Project Manager.
  1181. 155648812 13 12 1
  1182. 1348933640
  1183. 155648812 14 8 1
  1184. 1108282554
  1185. 155648152 13 12 1
  1186. 155648452
  1187. 155648152 14 8 1
  1188. 1108286146
  1189. 1107233386 -1 18 1
  1190. #include "rect.h"
  1191. 1336345626 -1 29 1
  1192. your method implementations.
  1193. 155648176 13 12 1
  1194. 155648020
  1195. 155648176 14 8 1
  1196. 1336348714
  1197. 157751222 -1 60 1
  1198. be controlled via the menu item "Options-Attributes First".
  1199. 155653552 13 12 1
  1200. 155656108
  1201. 155653552 14 8 1
  1202. 155650552
  1203. 1108284270 22 18 1
  1204. 1 8 8 9 117440512 201326591 0
  1205. 1108284090 42 82 1
  1206. 28 0 0
  1207. 1108284090 51 56 1
  1208. 1108284090 54 40 1
  1209. 1108279830 1107235714 0 0 162994250 0
  1210. 0 0
  1211. 1108284130 27 16 1
  1212. 135916 832 138581 18997
  1213. 1108284146 12 6 1
  1214. 155649424
  1215. 1
  1216. 1108284152 21 4 1
  1217. 1108280582
  1218. 1108284156 28 8 1
  1219. 135916 832
  1220. 1108283846 -1 52 1
  1221. Shape and Line classes in the following four files:
  1222. 155649004 13 12 1
  1223. 155649184
  1224. 155649004 14 8 1
  1225. 1108280562
  1226. 1332150314 -1 53 1
  1227. a pure virtual function called Draw(). Line inherits
  1228. 155648368 13 12 1
  1229. 155648104
  1230. 155648368 14 8 1
  1231. 1332151042
  1232. 155652652 13 12 1
  1233. 155652004
  1234. 155652652 14 8 1
  1235. 1108281782
  1236. 1108287398 42 82 1
  1237. 28 0 0
  1238. 1108287398 51 56 1
  1239. 1108287398 54 40 1
  1240. 163518446 1108283450 0 0 162994250 0
  1241. 0 0
  1242. 1108287438 27 16 1
  1243. 405491 832 408156 21497
  1244. 1108287454 12 6 1
  1245. 155648836
  1246. 1
  1247. 1108287460 21 4 1
  1248. 1108284966
  1249. 1108287464 28 8 1
  1250. 405491 832
  1251. 155648452 13 12 1
  1252. 155648632
  1253. 155648452 14 8 1
  1254. 1108284902
  1255. 155655964 -1 6 1
  1256. menu.
  1257. 155648020 13 12 1
  1258. 155655856
  1259. 155648020 14 8 1
  1260. 1336346086
  1261. 157753218 -1 57 1
  1262. Try out this option to see the effect on generated code.
  1263. 155656108 13 12 1
  1264. 155649688
  1265. 155656108 14 8 1
  1266. 157751402
  1267. 1108282882 24 22 1
  1268. 1 1 2 2 117440512 2 201326591 201326591
  1269. 1108282826 -1 31 1
  1270. - Build the Sample application
  1271. 1108282786 -1 16 1
  1272.         shape.h
  1273. 155649184 13 12 1
  1274. 155649448
  1275. 155649184 14 8 1
  1276. 1108279622
  1277. 1332157554 -1 50 1
  1278. from Shape and provides a real implementation for
  1279. 155648104 13 12 1
  1280. 155654260
  1281. 155648104 14 8 1
  1282. 155648644
  1283. 1108282554 -1 57 1
  1284. d) Double click the icon for the "Shape Hierarchy" class
  1285. 1108286146 -1 17 1
  1286. see the results.
  1287. 155648632 13 12 1
  1288. 155648860
  1289. 155648632 14 8 1
  1290. 1108283210
  1291. 1336348714 -1 54 1
  1292. Try adding some more classes, methods, attributes and
  1293. 155655856 13 12 1
  1294. 155652184
  1295. 155655856 14 8 1
  1296. 1336345842
  1297. 155652004 13 12 1
  1298. 155654548
  1299. 155652004 14 8 1
  1300. 1108280466
  1301. 155649688 13 12 1
  1302. 155653192
  1303. 155649688 14 8 1
  1304. 157750950
  1305. 1108281934 74 98 1
  1306. 0 0 3
  1307. 1108281934 33 8 1
  1308. 0
  1309. 1108281942 31 60 1
  1310. 1108281942 50 60 1
  1311. 1108281942 51 56 1
  1312. 1108281942 54 40 1
  1313. 1337397990 1107230826 0 1337397270 162989814 0
  1314. 0 0
  1315. 1108281982 27 16 1
  1316. -5000 -5000 2276 5000
  1317. 1108281998 23 4 1
  1318. 1337399550
  1319. 1108282002 28 8 1
  1320. 0 0
  1321. 1108282010 28 8 1
  1322. 0 0
  1323. 1108281222 41 82 1
  1324. 1108281222 42 82 1
  1325. 28 0 1
  1326. 1108281222 51 56 1
  1327. 1108281222 54 40 1
  1328. 0 0 1108281222 0 0 1107230826
  1329. 0 30001
  1330. 1108281262 27 16 1
  1331. -3500 -4000 2276 5000
  1332. 1108281278 12 6 1
  1333. 0
  1334. 0
  1335. 1108281284 21 4 1
  1336. 1337400550
  1337. 1108281288 28 8 1
  1338. -3500 500
  1339. 1108280878 72 96 1
  1340. 0 0 4
  1341. 1108280878 32 20 1
  1342. 0 0 0 0
  1343. 1108280898 39 62 1
  1344. 0 129
  1345. 1108280898 54 40 1
  1346. 1108285694 1337400370 0 0 162989814 0
  1347. 0 0
  1348. 1108280938 25 4 1
  1349. 1337400262
  1350. 1108280942 28 8 1
  1351. 0 0
  1352. 1108280950 28 8 1
  1353. 0 0
  1354. 1108280690 26 16 1
  1355. 1 1 2 0 117440512 201326591
  1356. 155649424 13 12 1
  1357. 155649424
  1358. 155649424 14 8 1
  1359. 1337401126
  1360. 1108280582 22 18 1
  1361. 1 8 8 12 50331903 201326591 1
  1362. 1108280562 -1 17 1
  1363.         shape.cc
  1364. 155649448 13 12 1
  1365. 155649604
  1366. 155649448 14 8 1
  1367. 1337401086
  1368. 1332151042 -1 19 1
  1369. the Draw() method.
  1370. 155654260 13 12 1
  1371. 155651764
  1372. 155654260 14 8 1
  1373. 1332150554
  1374. 155648836 13 12 1
  1375. 155648836
  1376. 155648836 14 8 1
  1377. 1108282502
  1378. 1108284966 22 18 1
  1379. 1 8 8 12 50331903 201326591 1
  1380. 1108284902 -1 61 1
  1381. Modify the file sample.cc as follows to create and draw some
  1382. 155648860 13 12 1
  1383. 155649112
  1384. 155648860 14 8 1
  1385. 1348931924
  1386. 1336346086 -1 53 1
  1387. relations to your shape model. Try changing names of
  1388. 155652184 13 12 1
  1389. 155650528
  1390. 155652184 14 8 1
  1391. 1336346326
  1392. 157751402 -1 55 1
  1393. 6) Assign multiple classes to the same header and body
  1394. 155653192 13 12 1
  1395. 155654080
  1396. 155653192 14 8 1
  1397. 157745454
  1398. 1108279830 42 82 1
  1399. 28 0 0
  1400. 1108279830 51 56 1
  1401. 1108279830 54 40 1
  1402. 1337399350 1108284090 0 0 162994250 0
  1403. 0 0
  1404. 1108279870 27 16 1
  1405. 138583 833 168985 37415
  1406. 1108279886 12 6 1
  1407. 155649964
  1408. 21
  1409. 1108279892 21 4 1
  1410. 641144094
  1411. 1108279896 28 8 1
  1412. 138583 833
  1413. 1108279622 -1 15 1
  1414.         line.h
  1415. 155649604 13 12 1
  1416. 155649808
  1417. 155649604 14 8 1
  1418. 1348934492
  1419. 162988494 24 22 1
  1420. 1 1 2 0 117440512 2 201326591 201326591
  1421. 155651764 13 12 1
  1422. 155651452
  1423. 155651764 14 8 1
  1424. 1332151230
  1425. 1108283450 42 82 1
  1426. 28 0 0
  1427. 1108283450 51 56 1
  1428. 1108283450 54 40 1
  1429. 1108287398 1107235798 0 0 162994250 0
  1430. 0 0
  1431. 1108283490 27 16 1
  1432. 367326 855 387816 52520
  1433. 1108283506 12 6 1
  1434. 155649496
  1435. 14
  1436. 1108283512 21 4 1
  1437. 1108280330
  1438. 1108283516 28 8 1
  1439. 367326 855
  1440. 1108283210 -1 49 1
  1441. rectangle shapes in addition to the line shapes:
  1442. 155649112 13 12 1
  1443. 155649232
  1444. 155649112 14 8 1
  1445. 1108280270
  1446. 1336345842 -1 51 1
  1447. classes. Regenerate the code. Observe how the code
  1448. 155650528 13 12 1
  1449. 155655832
  1450. 155650528 14 8 1
  1451. 1336344678
  1452. 157750950 -1 55 1
  1453. file pair. Notice how the code generator outputs these
  1454. 155654080 13 12 1
  1455. 155654656
  1456. 155654080 14 8 1
  1457. 157751162
  1458. 1337401126 -1 24 1
  1459. - Add a Rectangle class
  1460. 1337401086 -1 16 1
  1461.         line.cc
  1462. 155649808 13 12 1
  1463. 155650012
  1464. 155649808 14 8 1
  1465. 1337399062
  1466. 1332150554 -1 54 1
  1467. c) Double click the Shape and Line classes to explore
  1468. 155651452 13 12 1
  1469. 155651332
  1470. 155651452 14 8 1
  1471. 1332152202
  1472. 1108282502 -1 28 1
  1473. - Modify the driver program
  1474. 155649760 13 12 1
  1475. 155649760
  1476. 155649760 14 8 1
  1477. 641146726
  1478. 155649232 13 12 1
  1479. 155649520
  1480. 155649232 14 8 1
  1481. 1348934324
  1482. 1336346326 -1 62 1
  1483. generator reflects the modified architecture into your source
  1484. 155655832 13 12 1
  1485. 155653912
  1486. 155655832 14 8 1
  1487. 155652796
  1488. 157745454 -1 58 1
  1489. classes into the specified files. The order of classes in
  1490. 155654656 13 12 1
  1491. 155648056
  1492. 155654656 14 8 1
  1493. 157753154
  1494. 1337400550 22 18 1
  1495. 1 8 8 9 117440512 201326591 0
  1496. 1337400350 72 96 1
  1497. 0 0 3
  1498. 1337400350 32 20 1
  1499. 0 0 0 0
  1500. 1337400370 39 62 1
  1501. 0 129
  1502. 1337400370 54 40 1
  1503. 1108280898 1337396346 0 0 162989814 0
  1504. 0 0
  1505. 1337400410 25 4 1
  1506. 1337396238
  1507. 1337400414 28 8 1
  1508. 0 0
  1509. 1337400422 28 8 1
  1510. 0 0
  1511. 1337400262 26 16 1
  1512. 1 1 2 0 117440512 201326591
  1513. 155649964 13 12 1
  1514. 155650204
  1515. 155649964 14 8 1
  1516. 1337397534
  1517. 1337400862 22 18 1
  1518. 1 8 8 18 33488896 201326591 1
  1519. 155650012 13 12 1
  1520. 155650228
  1521. 155650012 14 8 1
  1522. 1337397002
  1523. 1332151230 -1 52 1
  1524. their specifications. Note that the Shape class has
  1525. 155651332 13 12 1
  1526. 155651668
  1527. 155651332 14 8 1
  1528. 1332152854
  1529. 155649496 13 12 1
  1530. 155649712
  1531. 155649496 14 8 1
  1532. 1348934636
  1533. 1108280330 22 18 1
  1534. 1 1 8 9 117440512 201326591 1
  1535. 1108280270 -1 58 1
  1536. a) Add a #include for the rectangle class as shown below:
  1537. 155649520 13 12 1
  1538. 155649736
  1539. 155649520 14 8 1
  1540. 1337400790
  1541. 1336344678 -1 51 1
  1542. files without loosing your method implementations.
  1543. 155653912 13 12 1
  1544. 155655100
  1545. 155653912 14 8 1
  1546. 1336345554
  1547. 157751162 -1 51 1
  1548. a source file can be changed by moving the section
  1549. 1337399550 24 22 1
  1550. 1 1 2 2 117440512 2 201326591 201326591
  1551. 1337399350 42 82 1
  1552. 28 0 0
  1553. 1337399350 51 56 1
  1554. 1337399350 54 40 1
  1555. 1337394950 1108279830 0 0 162994250 0
  1556. 0 0
  1557. 1337399390 27 16 1
  1558. 180829 917 183494 19166
  1559. 1337399406 12 6 1
  1560. 155650696
  1561. 1
  1562. 1337399412 21 4 1
  1563. 1337396002
  1564. 1337399416 28 8 1
  1565. 180829 917
  1566. 155650204 13 12 1
  1567. 155650492
  1568. 155650204 14 8 1
  1569. 1337395942
  1570. 1337399062 -1 58 1
  1571. These files are located under scase_directory:src:shapes.
  1572. 155650228 13 12 1
  1573. 155650516
  1574. 155650228 14 8 1
  1575. 1337395822
  1576. 1332152202 -1 54 1
  1577. a "Style" member, which is the character used to draw
  1578. 155651668 13 12 1
  1579. 155649844
  1580. 155651668 14 8 1
  1581. 1332153494
  1582. 1107235798 42 82 1
  1583. 28 0 0
  1584. 1107235798 51 56 1
  1585. 1107235798 54 40 1
  1586. 1108283450 1337398706 0 0 162994250 0
  1587. 0 0
  1588. 1107235838 27 16 1
  1589. 363764 940 367262 32189
  1590. 1107235854 12 6 1
  1591. 155650060
  1592. 2
  1593. 1107235860 21 4 1
  1594. 641144094
  1595. 1107235864 28 8 1
  1596. 363764 940
  1597. 155649712 13 12 1
  1598. 155649856
  1599. 155649712 14 8 1
  1600. 155649952
  1601. 155650600 13 12 1
  1602. 155650600
  1603. 155650600 14 8 1
  1604. 1332153278
  1605. 155649736 13 12 1
  1606. 155649880
  1607. 155649736 14 8 1
  1608. 1337399750
  1609. 1332153730 22 18 1
  1610. 1 8 8 12 50331903 201326591 1
  1611. 155655100 13 12 1
  1612. 155655544
  1613. 155655100 14 8 1
  1614. 1336348658
  1615. 157753154 -1 62 1
  1616. enclosing a class to the desired location. The code generator
  1617. 1337397982 74 98 1
  1618. 0 0 2
  1619. 1337397982 33 8 1
  1620. 0
  1621. 1337397990 31 60 1
  1622. 1337397990 50 60 1
  1623. 1337397990 51 56 1
  1624. 1337397990 54 40 1
  1625. 1332155882 1108281942 0 1332155162 162989814 0
  1626. 0 0
  1627. 1337398030 27 16 1
  1628. -5000 -5000 2276 5000
  1629. 1337398046 23 4 1
  1630. 1332157162
  1631. 1337398050 28 8 1
  1632. 0 0
  1633. 1337398058 28 8 1
  1634. 0 0
  1635. 1337397270 41 82 1
  1636. 1337397270 42 82 1
  1637. 28 0 1
  1638. 1337397270 51 56 1
  1639. 1337397270 54 40 1
  1640. 0 0 1337397270 0 0 1108281942
  1641. 0 30001
  1642. 1337397310 27 16 1
  1643. -3500 -4000 2276 5000
  1644. 1337397326 12 6 1
  1645. 0
  1646. 0
  1647. 1337397332 21 4 1
  1648. 1337393446
  1649. 1337397336 28 8 1
  1650. -3500 500
  1651. 1337397534 -1 34 1
  1652. e) Close the class specification.
  1653. 155650492 13 12 1
  1654. 155650720
  1655. 155650492 14 8 1
  1656. 1337394742
  1657. 1337397002 -1 59 1
  1658. You can open shape.h and shape.cc by shift double-clicking
  1659. 155650516 13 12 1
  1660. 155650744
  1661. 155650516 14 8 1
  1662. 1337394626
  1663. 1332152854 -1 49 1
  1664. the shape. The Line class has a "Length" member.
  1665. 155649844 13 12 1
  1666. 155654140
  1667. 155649844 14 8 1
  1668. 1332154318
  1669. 1108281782 -1 66 1
  1670. 7) Create a new class and fill in the name of the body file only.
  1671. 155649856 13 12 1
  1672. 155650096
  1673. 155649856 14 8 1
  1674. 1337398458
  1675. 1337400790 -1 27 1
  1676.         #include "shape.h"
  1677. 155649880 13 12 1
  1678. 155650120
  1679. 155649880 14 8 1
  1680. 1337398346
  1681. 1336345554 -1 67 1
  1682. 2) Try switching inline functions to "out-of-line" and vice versa.
  1683. 1337396326 72 96 1
  1684. 0 0 2
  1685. 1337396326 32 20 1
  1686. 0 0 0 0
  1687. 1337396346 39 62 1
  1688. 133 0
  1689. 1337396346 54 40 1
  1690. 1337400370 1332156962 0 0 162989814 0
  1691. 0 0
  1692. 1337396386 25 4 1
  1693. 1332156854
  1694. 1337396390 28 8 1
  1695. 0 0
  1696. 1337396398 28 8 1
  1697. 0 0
  1698. 1337396238 26 16 1
  1699. 1 1 2 0 117440512 201326591
  1700. 155650696 13 12 1
  1701. 155650696
  1702. 155650696 14 8 1
  1703. 1337393418
  1704. 1337396002 22 18 1
  1705. 1 8 8 12 50331903 201326591 1
  1706. 1337395942 -1 57 1
  1707. a) Add a class called Rectangle to the "Shape Hierarchy"
  1708. 155650720 13 12 1
  1709. 155650900
  1710. 155650720 14 8 1
  1711. 1348934480
  1712. 1337395822 -1 58 1
  1713. on the Shape class. Similarly, you can look at line.h and
  1714. 155650744 13 12 1
  1715. 155650924
  1716. 155650744 14 8 1
  1717. 1348934912
  1718. 1332153494 -1 54 1
  1719. Also note how the access of attributes and methods is
  1720. 155654140 13 12 1
  1721. 155649196
  1722. 155654140 14 8 1
  1723. 1332155134
  1724. 155650060 13 12 1
  1725. 155650312
  1726. 155650060 14 8 1
  1727. 1337396802
  1728. 155649952 -1 5 1
  1729. void
  1730. 155650096 13 12 1
  1731. 155650336
  1732. 155650096 14 8 1
  1733. 1348934984
  1734. 1337399750 -1 26 1
  1735.         #include "line.h"
  1736. 155650120 13 12 1
  1737. 155650360
  1738. 155650120 14 8 1
  1739. 1348935224
  1740. 1336348658 -1 54 1
  1741. Note how the code generator moves the associated code
  1742. 1337394950 42 82 1
  1743. 28 0 0
  1744. 1337394950 51 56 1
  1745. 1337394950 54 40 1
  1746. 1332154838 1337399350 0 0 162994250 0
  1747. 0 0
  1748. 1337394990 27 16 1
  1749. 183578 832 218228 41497
  1750. 1337395006 12 6 1
  1751. 155651272
  1752. 24
  1753. 1337395012 21 4 1
  1754. 641144094
  1755. 1337395016 28 8 1
  1756. 183578 832
  1757. 1337394742 -1 15 1
  1758. class diagram.
  1759. 155650900 13 12 1
  1760. 155651104
  1761. 155650900 14 8 1
  1762. 1332156602
  1763. 1337394626 -1 52 1
  1764. line.cc by shift double-clicking on the Line class.
  1765. 155650924 13 12 1
  1766. 155651164
  1767. 155650924 14 8 1
  1768. 1332156478
  1769. 1332154318 -1 54 1
  1770. shown using vertical bars in front of these elements.
  1771. 155649196 13 12 1
  1772. 155653852
  1773. 155649196 14 8 1
  1774. 155655772
  1775. 1337398706 42 82 1
  1776. 28 0 0
  1777. 1337398706 51 56 1
  1778. 1337398706 54 40 1
  1779. 1107235798 1337394310 0 0 162994250 0
  1780. 0 0
  1781. 1337398746 27 16 1
  1782. 360932 939 363597 26771
  1783. 1337398762 12 6 1
  1784. 155650768
  1785. 1
  1786. 1337398768 21 4 1
  1787. 1337395598
  1788. 1337398772 28 8 1
  1789. 360932 939
  1790. 155650312 13 12 1
  1791. 155650060
  1792. 155650312 14 8 1
  1793. 1337395534
  1794. 1337398458 -1 18 1
  1795. Rectangle::Draw()
  1796. 155650336 13 12 1
  1797. 155650564
  1798. 155650336 14 8 1
  1799. 1337395442
  1800. 1337398346 -1 48 1
  1801.         #include "rect.h"      // ADD THIS LINE
  1802. 155650360 13 12 1
  1803. 155650588
  1804. 155650360 14 8 1
  1805. 1337395318
  1806. 1337393446 22 18 1
  1807. 1 8 8 9 117440512 201326591 0
  1808. 1337393418 -1 24 1
  1809. - Generate Source Files
  1810. 155654548 13 12 1
  1811. 155651092
  1812. 155654548 14 8 1
  1813. 1108284482
  1814. 155651104 13 12 1
  1815. 155651296
  1816. 155651104 14 8 1
  1817. 1332154566
  1818. 1337393846 42 82 1
  1819. 28 0 0
  1820. 1337393846 51 56 1
  1821. 1337393846 54 40 1
  1822. 641141122 635371606 0 0 162989814 0
  1823. 0 0
  1824. 1337393886 27 16 1
  1825. 0 0 0 0
  1826. 1337393902 12 6 1
  1827. 0
  1828. 0
  1829. 1337393908 21 4 1
  1830. 641144094
  1831. 1337393912 28 8 1
  1832. 0 0
  1833. 155651164 13 12 1
  1834. 155651320
  1835. 155651164 14 8 1
  1836. 1332154438
  1837. 1332155134 -1 23 1
  1838. As per Booch notation:
  1839. 155653852 13 12 1
  1840. 155654752
  1841. 155653852 14 8 1
  1842. 1332155838
  1843. 1337396802 -1 23 1
  1844. method as shown below:
  1845. 1337393266 64 61 1
  1846. V
  1847. 1337393266 31 60 1
  1848. 1337393266 50 60 1
  1849. 1337393266 51 56 1
  1850. 1337393266 54 40 1
  1851. 635371606 1482098986 0 0 162989814 0
  1852. 0 0
  1853. 1337393306 27 16 1
  1854. -1000 -1000 1000 1000
  1855. 1337393322 23 4 1
  1856. 1482100814
  1857. 155650564 13 12 1
  1858. 155650792
  1859. 155650564 14 8 1
  1860. 1337394086
  1861. 1332157682 41 82 1
  1862. 1332157682 42 82 1
  1863. 28 0 5
  1864. 1332157682 51 56 1
  1865. 1332157682 54 40 1
  1866. 0 0 1332157682 0 0 635371606
  1867. 0 30001
  1868. 1332157722 27 16 1
  1869. -2500 -5000 2500 5000
  1870. 1332157738 12 6 1
  1871. 0
  1872. 0
  1873. 1332157744 21 4 1
  1874. 641139994
  1875. 1332157748 28 8 1
  1876. 0 0
  1877. 155650588 13 12 1
  1878. 155650816
  1879. 155650588 14 8 1
  1880. 1348934684
  1881. 1332157162 24 22 1
  1882. 1 1 2 2 117440512 2 180404416 201326591
  1883. 1332156942 72 96 1
  1884. 0 0 1
  1885. 1332156942 32 20 1
  1886. 0 0 0 0
  1887. 1332156962 39 62 1
  1888. 5 0
  1889. 1332156962 54 40 1
  1890. 1337396346 1332152666 0 0 162989814 0
  1891. 0 0
  1892. 1332157002 25 4 1
  1893. 1332152558
  1894. 1332157006 28 8 1
  1895. 0 0
  1896. 1332157014 28 8 1
  1897. 0 0
  1898. 1332156854 26 16 1
  1899. 1 1 2 0 117440512 201326591
  1900. 155651272 13 12 1
  1901. 155651548
  1902. 155651272 14 8 1
  1903. 1332153750
  1904. 1332156602 -1 61 1
  1905. b) Draw an inheritance relationship from Rectangle to Shape.
  1906. 155651296 13 12 1
  1907. 155651572
  1908. 155651296 14 8 1
  1909. 1332153670
  1910. 1332156478 -1 60 1
  1911. b) We have also provided a driver program to test the above
  1912. 155651320 13 12 1
  1913. 155651596
  1914. 155651320 14 8 1
  1915. 1332153550
  1916. 1332153310 42 82 1
  1917. 28 0 0
  1918. 1332153310 51 56 1
  1919. 1332153310 54 40 1
  1920. 1482104222 1108286910 0 0 162994250 0
  1921. 0 0
  1922. 1332153350 27 16 1
  1923. 4501 916 16495 31748
  1924. 1332153366 12 6 1
  1925. 155652964
  1926. 8
  1927. 1332153372 21 4 1
  1928. 641144094
  1929. 1332153376 28 8 1
  1930. 4501 916
  1931. 155654752 13 12 1
  1932. 155651632
  1933. 155654752 14 8 1
  1934. 1332157130
  1935. 155650768 13 12 1
  1936. 155650768
  1937. 155650768 14 8 1
  1938. 1332157478
  1939. 1337395598 22 18 1
  1940. 1 8 8 12 50331903 201326591 1
  1941. 1337395534 -1 60 1
  1942. b) In the file rect.cc add the implementation of the Draw()
  1943. 1337395442 -1 69 1
  1944. // -MQBeg- [Op_Body] [Rectangle::Draw] <00000066.0000001D> Retained!
  1945. 155650792 13 12 1
  1946. 155650984
  1947. 155650792 14 8 1
  1948. 1332157414
  1949. 1337395318 -1 62 1
  1950. b) Replace one line in case 2 of the CreateShapes() function:
  1951. 155650816 13 12 1
  1952. 155651044
  1953. 155650816 14 8 1
  1954. 1332157334
  1955. 1332155874 74 98 1
  1956. 0 0 4
  1957. 1332155874 33 8 1
  1958. 0
  1959. 1332155882 31 60 1
  1960. 1332155882 50 60 1
  1961. 1332155882 51 56 1
  1962. 1332155882 54 40 1
  1963. 641145710 1337397990 0 641144990 162989814 0
  1964. 0 0
  1965. 1332155922 27 16 1
  1966. -5000 -5000 2276 5000
  1967. 1332155938 23 4 1
  1968. 641146642
  1969. 1332155942 28 8 1
  1970. 0 0
  1971. 1332155950 28 8 1
  1972. 0 0
  1973. 1332155162 41 82 1
  1974. 1332155162 42 82 1
  1975. 28 0 1
  1976. 1332155162 51 56 1
  1977. 1332155162 54 40 1
  1978. 0 0 1332155162 0 0 1337397990
  1979. 0 30001
  1980. 1332155202 27 16 1
  1981. -3500 -4000 2276 5000
  1982. 1332155218 12 6 1
  1983. 0
  1984. 0
  1985. 1332155224 21 4 1
  1986. 1332151326
  1987. 1332155228 28 8 1
  1988. -3500 500
  1989. 1332154838 42 82 1
  1990. 28 0 0
  1991. 1332154838 51 56 1
  1992. 1332154838 54 40 1
  1993. 1332151146 1337394950 0 0 162994250 0
  1994. 0 0
  1995. 1332154878 27 16 1
  1996. 225610 886 228275 31635
  1997. 1332154894 12 6 1
  1998. 155651944
  1999. 1
  2000. 1332154900 21 4 1
  2001. 1332152322
  2002. 1332154904 28 8 1
  2003. 225610 886
  2004. 155651548 13 12 1
  2005. 155651728
  2006. 155651548 14 8 1
  2007. 1332152258
  2008. 1332154566 -1 62 1
  2009. The arrow of the relationship should point to Shape, which is
  2010. 155651572 13 12 1
  2011. 155651752
  2012. 155651572 14 8 1
  2013. 1348935620
  2014. 1332154438 -1 65 1
  2015. implementations of Shape & Line. This driver is in a file called
  2016. 155651596 13 12 1
  2017. 155651776
  2018. 155651596 14 8 1
  2019. 1332151726
  2020. 1332155838 -1 31 1
  2021.         No bar = public access
  2022. 155651632 13 12 1
  2023. 155653384
  2024. 155651632 14 8 1
  2025. 1332158426
  2026. 1337394310 42 82 1
  2027. 28 0 0
  2028. 1337394310 51 56 1
  2029. 1337394310 54 40 1
  2030. 1337398706 1332154198 0 0 162994250 0
  2031. 0 0
  2032. 1337394350 27 16 1
  2033. 325545 771 354531 56186
  2034. 1337394366 12 6 1
  2035. 155651344
  2036. 20
  2037. 1337394372 21 4 1
  2038. 1332156330
  2039. 1337394376 28 8 1
  2040. 325545 771
  2041. 1337394086 -1 33 1
  2042.   char style = this->GetStyle();
  2043. 155650984 13 12 1
  2044. 155651188
  2045. 155650984 14 8 1
  2046. 155651260
  2047. 1108284546 42 82 1
  2048. 28 0 0
  2049. 1108284546 51 56 1
  2050. 1108284546 54 40 1
  2051. 1332150958 1332152018 0 0 162994250 0
  2052. 0 0
  2053. 1108284586 27 16 1
  2054. 495755 1165 498420 21414
  2055. 1108284602 12 6 1
  2056. 155649988
  2057. 1
  2058. 1108284608 21 4 1
  2059. 1337396734
  2060. 1108284612 28 8 1
  2061. 495755 1165
  2062. 155651044 13 12 1
  2063. 155651212
  2064. 155651044 14 8 1
  2065. 1332156222
  2066. 1332153750 -1 40 1
  2067. generated automatically from the model.
  2068. 155651728 13 12 1
  2069. 155651968
  2070. 155651728 14 8 1
  2071. 1332150894
  2072. 1332153670 -1 18 1
  2073. the parent class.
  2074. 155651752 13 12 1
  2075. 155652028
  2076. 155651752 14 8 1
  2077. 1332150770
  2078. 1332153550 -1 55 1
  2079. sample.cc. Open this file using the File-Open menu and
  2080. 155651776 13 12 1
  2081. 155652052
  2082. 155651776 14 8 1
  2083. 1332150690
  2084. 1332157130 -1 29 1
  2085.         | = protected access
  2086. 1332157478 -1 38 1
  2087. - Filling in the method stubs (cont.)
  2088. 1332157414 -1 40 1
  2089.   for (int Line=0; Line<Height; Line++)
  2090. 155651188 13 12 1
  2091. 155651380
  2092. 155651188 14 8 1
  2093. 1332153934
  2094. 1332157334 -1 16 1
  2095.         Before:
  2096. 155651212 13 12 1
  2097. 155651404
  2098. 155651212 14 8 1
  2099. 1332153854
  2100. 1332152646 72 96 1
  2101. 0 0 0
  2102. 1332152646 32 20 1
  2103. 0 0 0 0
  2104. 1332152666 39 62 1
  2105. 0 0
  2106. 1332152666 54 40 1
  2107. 1332156962 641144650 0 0 162989814 0
  2108. 0 0
  2109. 1332152706 25 4 1
  2110. 641144290
  2111. 1332152710 28 8 1
  2112. 0 0
  2113. 1332152718 28 8 1
  2114. 0 0
  2115. 1332152558 26 16 1
  2116. 1 1 2 0 117440512 201326591
  2117. 155651944 13 12 1
  2118. 155651944
  2119. 155651944 14 8 1
  2120. 641146578
  2121. 1332152322 22 18 1
  2122. 1 8 8 12 50331903 201326591 1
  2123. 1332152258 -1 60 1
  2124. a) Select the Rectangle class by clicking on it. Now choose
  2125. 155651968 13 12 1
  2126. 155652220
  2127. 155651968 14 8 1
  2128. 641146502
  2129. 1108280466 -1 61 1
  2130. Leave the name of the header file blank. Notice how the code
  2131. 155652028 13 12 1
  2132. 155652244
  2133. 155652028 14 8 1
  2134. 641146422
  2135. 1332151726 -1 59 1
  2136. explore its contents. The sample program creates 10 shapes
  2137. 155652052 13 12 1
  2138. 155652268
  2139. 155652052 14 8 1
  2140. 1348935164
  2141. 1332158426 -1 28 1
  2142.         || = private access
  2143. 155651344 13 12 1
  2144. 155651656
  2145. 155651344 14 8 1
  2146. 1348932164
  2147. 1332156330 22 18 1
  2148. 1 1 8 9 117440512 201326591 1
  2149. 155651260 -1 4 1
  2150.   {
  2151. 155651380 13 12 1
  2152. 155651680
  2153. 155651380 14 8 1
  2154. 1332153022
  2155. 1332156222 -1 43 1
  2156.             Shapes[i] = new Line('x', 30);
  2157. 155651404 13 12 1
  2158. 155651704
  2159. 155651404 14 8 1
  2160. 1332152906
  2161. 1332151326 22 18 1
  2162. 1 8 8 9 117440512 201326591 0
  2163. 1332151146 42 82 1
  2164. 28 0 0
  2165. 1332151146 51 56 1
  2166. 1332151146 54 40 1
  2167. 641143278 1332154838 0 0 162994250 0
  2168. 0 0
  2169. 1332151186 27 16 1
  2170. 228931 886 256501 37802
  2171. 1332151202 12 6 1
  2172. 155649052
  2173. 19
  2174. 1332151208 21 4 1
  2175. 641144094
  2176. 1332151212 28 8 1
  2177. 228931 886
  2178. 1332150894 -1 60 1
  2179. "Generate Code" from the "Actions" menu. This will generate
  2180. 155652220 13 12 1
  2181. 155652424
  2182. 155652220 14 8 1
  2183. 1348933376
  2184. 1332150770 -1 61 1
  2185. c) Double click on the Rectangle class to bring up its class
  2186. 155652244 13 12 1
  2187. 155652448
  2188. 155652244 14 8 1
  2189. 1348935464
  2190. 1332150690 -1 16 1
  2191. and draws them.
  2192. 155652268 13 12 1
  2193. 155652472
  2194. 155652268 14 8 1
  2195. 641144018
  2196. 1332154198 42 82 1
  2197. 28 0 0
  2198. 1332154198 51 56 1
  2199. 1332154198 54 40 1
  2200. 1337394310 1332150450 0 0 162994250 0
  2201. 0 0
  2202. 1332154238 27 16 1
  2203. 318796 937 325126 32352
  2204. 1332154254 12 6 1
  2205. 155652076
  2206. 4
  2207. 1332154260 21 4 1
  2208. 641144094
  2209. 1332154264 28 8 1
  2210. 318796 937
  2211. 155651656 13 12 1
  2212. 155651836
  2213. 155651656 14 8 1
  2214. 155652016
  2215. 1332153934 -1 33 1
  2216.     for (int i=0; i<Length; i++)
  2217. 155651680 13 12 1
  2218. 155651860
  2219. 155651680 14 8 1
  2220. 1332151522
  2221. 1332153854 -1 15 1
  2222.         After:
  2223. 155651704 13 12 1
  2224. 155651884
  2225. 155651704 14 8 1
  2226. 1348934720
  2227. 641146642 24 22 1
  2228. 1 1 2 2 117440512 2 201326591 201326591
  2229. 641146578 -1 40 1
  2230. - Complete the Rectangle implementation
  2231. 641146502 -1 51 1
  2232. the header and body files for the Rectangle class.
  2233. 155652424 13 12 1
  2234. 155652712
  2235. 155652424 14 8 1
  2236. 641142982
  2237. 641146422 -1 15 1
  2238. specification.
  2239. 155652448 13 12 1
  2240. 155652736
  2241. 155652448 14 8 1
  2242. 641142854
  2243. 155651092 13 12 1
  2244. 155652592
  2245. 155651092 14 8 1
  2246. 1108285610
  2247. 155652472 13 12 1
  2248. 155652760
  2249. 155652472 14 8 1
  2250. 1348935440
  2251. 641146726 -1 20 1
  2252. C++ Code Generation
  2253. 155651836 13 12 1
  2254. 155652112
  2255. 155651836 14 8 1
  2256. 1337393198
  2257. 1332153022 -1 57 1
  2258.       ( Line>0 && Line<Height-1 && i>0 && i<Length-1 ) ?
  2259. 155651860 13 12 1
  2260. 155652136
  2261. 155651860 14 8 1
  2262. 641146810
  2263. 1332152906 -1 51 1
  2264.             Shapes[i] = new Rectangle('x', 30, 3);
  2265. 155651884 13 12 1
  2266. 155652160
  2267. 155651884 14 8 1
  2268. 1348934960
  2269. 641145702 74 98 1
  2270. 0 0 5
  2271. 641145702 33 8 1
  2272. 0
  2273. 641145710 31 60 1
  2274. 641145710 50 60 1
  2275. 641145710 51 56 1
  2276. 641145710 54 40 1
  2277. 641144650 1332155882 0 641139206 162989814 0
  2278. 0 0
  2279. 641145750 27 16 1
  2280. -5000 -5000 2276 5000
  2281. 641145766 23 4 1
  2282. 641140186
  2283. 641145770 28 8 1
  2284. 0 0
  2285. 641145778 28 8 1
  2286. 0 0
  2287. 641144990 41 82 1
  2288. 641144990 42 82 1
  2289. 28 0 1
  2290. 641144990 51 56 1
  2291. 641144990 54 40 1
  2292. 0 0 641144990 0 0 1332155882
  2293. 0 30001
  2294. 641145030 27 16 1
  2295. -3500 -4000 2276 5000
  2296. 641145046 12 6 1
  2297. 0
  2298. 0
  2299. 641145052 21 4 1
  2300. 641140878
  2301. 641145056 28 8 1
  2302. -3500 500
  2303. 641144642 74 98 1
  2304. 0 0 6
  2305. 641144642 33 8 1
  2306. 0
  2307. 641144650 31 60 1
  2308. 641144650 50 60 1
  2309. 641144650 51 56 1
  2310. 641144650 54 40 1
  2311. 1332152666 641145710 0 1482104742 162989814 0
  2312. 0 0
  2313. 641144690 27 16 1
  2314. -5000 -5000 2276 5000
  2315. 641144706 23 4 1
  2316. 641140142
  2317. 641144710 28 8 1
  2318. 0 0
  2319. 641144718 28 8 1
  2320. 0 0
  2321. 641144290 26 16 1
  2322. 1 1 2 0 117440512 201326591
  2323. 155649052 13 12 1
  2324. 155655052
  2325. 155649052 14 8 1
  2326. 163519122
  2327. 1332153278 -1 30 1
  2328. - Other things to try (cont.)
  2329. 155652712 13 12 1
  2330. 155652916
  2331. 155652712 14 8 1
  2332. 641142026
  2333. 1108284482 -1 60 1
  2334. generator produces both the class definition and the method
  2335. 155652736 13 12 1
  2336. 155652940
  2337. 155652736 14 8 1
  2338. 641141902
  2339. 641144018 -1 31 1
  2340. c) Close all the source files.
  2341. 155652760 13 12 1
  2342. 155652988
  2343. 155652760 14 8 1
  2344. 641141774
  2345. 155652076 13 12 1
  2346. 155652328
  2347. 155652076 14 8 1
  2348. 641146210
  2349. 155652016 -1 8 1
  2350. inline 
  2351. 155652112 13 12 1
  2352. 155652352
  2353. 155652112 14 8 1
  2354. 641146074
  2355. 1332151522 -1 39 1
  2356.         putchar(' ') : putchar(style);
  2357. 155652136 13 12 1
  2358. 155652376
  2359. 155652136 14 8 1
  2360. 155652316
  2361. 155652592 13 12 1
  2362. 155653876
  2363. 155652592 14 8 1
  2364. 1108280630
  2365. 155652160 13 12 1
  2366. 155652400
  2367. 155652160 14 8 1
  2368. 641145926
  2369. 641143278 42 82 1
  2370. 28 0 0
  2371. 641143278 51 56 1
  2372. 641143278 54 40 1
  2373. 641142534 1332151146 0 0 162994250 0
  2374. 0 0
  2375. 641143318 27 16 1
  2376. 270950 894 273615 36893
  2377. 641143334 12 6 1
  2378. 155653252
  2379. 1
  2380. 641143340 21 4 1
  2381. 641140790
  2382. 641143344 28 8 1
  2383. 270950 894
  2384. 155655052 13 12 1
  2385. 155654980
  2386. 155655052 14 8 1
  2387. 157228198
  2388. 641142982 -1 64 1
  2389. b) Shift double-click on the Rectangle class to open the header
  2390. 155652916 13 12 1
  2391. 155653120
  2392. 155652916 14 8 1
  2393. 641140642
  2394. 641142854 -1 63 1
  2395. d) Notice that "Header" and "Body" file names have been seeded
  2396. 155652940 13 12 1
  2397. 155653144
  2398. 155652940 14 8 1
  2399. 641140510
  2400. 155652964 13 12 1
  2401. 155653720
  2402. 155652964 14 8 1
  2403. 1482100506
  2404. 155652988 13 12 1
  2405. 155653168
  2406. 155652988 14 8 1
  2407. 641140390
  2408. 1332150450 42 82 1
  2409. 28 0 0
  2410. 1332150450 51 56 1
  2411. 1332150450 54 40 1
  2412. 1332154198 641142534 0 0 162994250 0
  2413. 0 0
  2414. 1332150490 27 16 1
  2415. 316131 855 318796 21437
  2416. 1332150506 12 6 1
  2417. 155652784
  2418. 1
  2419. 1332150512 21 4 1
  2420. 641143870
  2421. 1332150516 28 8 1
  2422. 316131 855
  2423. 155652328 13 12 1
  2424. 155652496
  2425. 155652328 14 8 1
  2426. 641143814
  2427. 1337393198 -1 23 1
  2428. Rectangle::Rectangle()
  2429. 155652352 13 12 1
  2430. 155652520
  2431. 155652352 14 8 1
  2432. 641143686
  2433. 641146810 -1 19 1
  2434.     putchar('\n');
  2435. 155652376 13 12 1
  2436. 155649496
  2437. 155652376 14 8 1
  2438. 641143562
  2439. 155649988 13 12 1
  2440. 155649988
  2441. 155649988 14 8 1
  2442. 641146330
  2443. 155652400 13 12 1
  2444. 155648152
  2445. 155652400 14 8 1
  2446. 641143478
  2447. 163519122 -1 61 1
  2448.         Check the inline box to make the constructor inline.
  2449. 155654980 13 12 1
  2450. 155654812
  2451. 155654980 14 8 1
  2452. 157228490
  2453. 641142026 -1 64 1
  2454. and body files. Explore the files and familiarize yourself with
  2455. 155653120 13 12 1
  2456. 155653300
  2457. 155653120 14 8 1
  2458. 1348934504
  2459. 641141902 -1 62 1
  2460. with "Rectangle". You can change these names if you wish. For
  2461. 155653144 13 12 1
  2462. 155653324
  2463. 155653144 14 8 1
  2464. 641139882
  2465. 641141774 -1 64 1
  2466. d) We have provided a trivial script called "build" that allows
  2467. 155653168 13 12 1
  2468. 155648080
  2469. 155653168 14 8 1
  2470. 641139754
  2471. 641146210 -1 58 1
  2472. a) In the file rect.h add the 3 marked lines shown below:
  2473. 155652496 13 12 1
  2474. 155652808
  2475. 155652496 14 8 1
  2476. 641142318
  2477. 641146074 -1 74 1
  2478. // -MQBeg- [Op_Init] [Rectangle::Rectangle] <00000066.0000001B> Retained!
  2479. 155652520 13 12 1
  2480. 155652832
  2481. 155652520 14 8 1
  2482. 1348935656
  2483. 155652316 -1 4 1
  2484.   }
  2485. 641145926 -1 63 1
  2486. Now modify your build script to include the rectangle class in
  2487. 641140878 22 18 1
  2488. 1 8 8 9 117440512 201326591 0
  2489. 155653252 13 12 1
  2490. 155653252
  2491. 155653252 14 8 1
  2492. 1482104422
  2493. 641140790 22 18 1
  2494. 1 8 8 12 50331903 201326591 1
  2495. 157228198 -1 61 1
  2496. a) Double click on the Rectangle class to bring up its class
  2497. 155654812 13 12 1
  2498. 155654728
  2499. 155654812 14 8 1
  2500. 155654908
  2501. 641140642 -1 20 1
  2502. the generated code.
  2503. 155653300 13 12 1
  2504. 155653420
  2505. 155653300 14 8 1
  2506. 1482103934
  2507. 641140510 -1 70 1
  2508. the purpose of this tutorial, let us change both the names to "rect".
  2509. 155653324 13 12 1
  2510. 155653444
  2511. 155653324 14 8 1
  2512. 1482103810
  2513. 641140390 -1 55 1
  2514. you to make this sample application. Please modify the
  2515. 155652784 13 12 1
  2516. 155652784
  2517. 155652784 14 8 1
  2518. 641141682
  2519. 641143870 22 18 1
  2520. 1 8 8 12 50331903 201326591 1
  2521. 641143814 -1 53 1
  2522. To complete the Rectangle implementation we must now
  2523. 155652808 13 12 1
  2524. 155652076
  2525. 155652808 14 8 1
  2526. 1348934660
  2527. 641143686 -1 65 1
  2528. // -MQEnd- [Op_Init] [Rectangle::Rectangle] <00000066.0000001B> 
  2529. 155652832 13 12 1
  2530. 155653072
  2531. 155652832 14 8 1
  2532. 641140966
  2533. 641143562 -1 60 1
  2534. // -MQEnd- [Op_Body] [Rectangle::Draw] <00000066.0000001D> 
  2535. 641143478 -1 62 1
  2536. the sample application. Rebuild the application and run it to
  2537. 641140186 24 22 1
  2538. 1 1 2 2 117440512 2 201326591 201326591
  2539. 641140142 24 22 1
  2540. 1 1 2 2 117440512 2 201326591 201326591
  2541. 641142534 42 82 1
  2542. 28 0 0
  2543. 641142534 51 56 1
  2544. 641142534 54 40 1
  2545. 1332150450 641143278 0 0 162994250 0
  2546. 0 0
  2547. 641142574 27 16 1
  2548. 274116 892 307350 34058
  2549. 641142590 12 6 1
  2550. 155653348
  2551. 23
  2552. 641142596 21 4 1
  2553. 641144094
  2554. 641142600 28 8 1
  2555. 274116 892
  2556. 157228490 -1 15 1
  2557. specification.
  2558. 155654728 13 12 1
  2559. 155654512
  2560. 155654728 14 8 1
  2561. 157228126
  2562. 1337396734 22 18 1
  2563. 1 8 8 12 50331903 201326591 1
  2564. 155653420 13 12 1
  2565. 155653648
  2566. 155653420 14 8 1
  2567. 1482103382
  2568. 641139882 -1 67 1
  2569. S-CASE will automatically append the appropriate suffixes to these
  2570. 155653444 13 12 1
  2571. 155653672
  2572. 155653444 14 8 1
  2573. 1482103254
  2574. 641139754 -1 63 1
  2575. script to suit your compiler and build the sample application.
  2576. 641142318 -1 26 1
  2577. fill in the method stubs.
  2578. 1108285610 -1 61 1
  2579. stubs in the body file. This technique can be used to create
  2580. 155653072 13 12 1
  2581. 155653228
  2582. 155653072 14 8 1
  2583. 641140270
  2584. 641139206 41 82 1
  2585. 641139206 42 82 1
  2586. 28 0 1
  2587. 641139206 51 56 1
  2588. 641139206 54 40 1
  2589. 0 0 641139206 0 0 641145710
  2590. 0 30001
  2591. 641139246 27 16 1
  2592. -3500 -4000 2276 5000
  2593. 641139262 12 6 1
  2594. 0
  2595. 0
  2596. 641139268 21 4 1
  2597. 1482102122
  2598. 641139272 28 8 1
  2599. -3500 500
  2600. 1482104742 41 82 1
  2601. 1482104742 42 82 1
  2602. 28 0 1
  2603. 1482104742 51 56 1
  2604. 1482104742 54 40 1
  2605. 0 0 1482104742 0 0 641144650
  2606. 0 30001
  2607. 1482104782 27 16 1
  2608. -3500 -4000 2276 5000
  2609. 1482104798 12 6 1
  2610. 0
  2611. 0
  2612. 1482104804 21 4 1
  2613. 1482102074
  2614. 1482104808 28 8 1
  2615. -3500 500
  2616. 1482104422 -1 48 1
  2617. - Complete the Rectangle implementation (cont.)
  2618. 155653876 13 12 1
  2619. 155650084
  2620. 155653876 14 8 1
  2621. 155653936
  2622. 155654512 13 12 1
  2623. 155654608
  2624. 155654512 14 8 1
  2625. 157228446
  2626. 1482103934 -1 56 1
  2627. c) Both files have a copyright message at the top. This
  2628. 155653648 13 12 1
  2629. 155653792
  2630. 155653648 14 8 1
  2631. 1482102502
  2632. 1482103810 -1 61 1
  2633. names to create the header and body files. By default, these
  2634. 155653672 13 12 1
  2635. 155653816
  2636. 155653672 14 8 1
  2637. 1482102382
  2638. 641141682 -1 30 1
  2639. - Filling in the method stubs
  2640. 641141122 63 82 1
  2641. 641141122 41 82 1
  2642. 641141122 42 82 1
  2643. 28 4 0
  2644. 641141122 51 56 1
  2645. 641141122 54 40 1
  2646. 162990746 1337393846 0 0 162989814 0
  2647. 0 30011
  2648. 641141162 27 16 1
  2649. 0 0 0 0
  2650. 641141178 12 6 1
  2651. 0
  2652. 0
  2653. 641141184 21 4 1
  2654. 162992650
  2655. 641141188 28 8 1
  2656. 0 0
  2657. 641140966 -1 74 1
  2658. // -MQBeg- [Op_Body] [Rectangle::Rectangle] <00000066.0000001B> Retained!
  2659. 155653228 13 12 1
  2660. 155653372
  2661. 155653228 14 8 1
  2662. 641139626
  2663. 155653348 13 12 1
  2664. 155648848
  2665. 155653348 14 8 1
  2666. 1108284718
  2667. 157228126 -1 70 1
  2668. b) Add an attribute called "Length" by clicking the "Attributes: Add"
  2669. 155654608 13 12 1
  2670. 155654392
  2671. 155654608 14 8 1
  2672. 157227994
  2673. 1482103382 -1 52 1
  2674. message can be altered in several ways. The easiest
  2675. 155653792 13 12 1
  2676. 155653948
  2677. 155653792 14 8 1
  2678. 1348935512
  2679. 1482103254 -1 64 1
  2680. suffixes are .h and .cc, but you can change them from the class
  2681. 155653816 13 12 1
  2682. 155653972
  2683. 155653816 14 8 1
  2684. 1482101846
  2685. 641140270 -1 58 1
  2686.   Length=10; Height=5;          //<-------- ADD THIS LINE
  2687. 155653372 13 12 1
  2688. 155653492
  2689. 155653372 14 8 1
  2690. 1348933184
  2691. 155648848 13 12 1
  2692. 155654236
  2693. 155648848 14 8 1
  2694. 1108282134
  2695. 157228446 -1 41 1
  2696. button. Set up the attribute as follows:
  2697. 155654392 13 12 1
  2698. 155654200
  2699. 155654392 14 8 1
  2700. 157220886
  2701. 1482102502 -1 66 1
  2702. is to alter the file called cpyright.msg in the S-CASE directory.
  2703. 155653948 13 12 1
  2704. 155654104
  2705. 155653948 14 8 1
  2706. 1482101406
  2707. 1482102382 -1 58 1
  2708. diagram Options menu. Also on platforms, where file names
  2709. 155653972 13 12 1
  2710. 155654128
  2711. 155653972 14 8 1
  2712. 1482101286
  2713. 641139626 -1 65 1
  2714. // -MQEnd- [Op_Body] [Rectangle::Rectangle] <00000066.0000001B> 
  2715. 155653492 13 12 1
  2716. 155653744
  2717. 155653492 14 8 1
  2718. 1348935428
  2719. 1482102122 22 18 1
  2720. 1 8 8 9 117440512 201326591 0
  2721. 1482102074 22 18 1
  2722. 1 8 8 9 117440512 201326591 0
  2723. 1108284718 -1 36 1
  2724. the source for the Rectangle class.
  2725. 155654236 13 12 1
  2726. 155653000
  2727. 155654236 14 8 1
  2728. 1108284030
  2729. 157227994 -1 21 1
  2730.         Name: Length
  2731. 155654200 13 12 1
  2732. 155654296
  2733. 155654200 14 8 1
  2734. 157228098
  2735. 641139994 22 18 1
  2736. 1 8 8 9 117440512 201326591 0
  2737. 155654104 13 12 1
  2738. 155654224
  2739. 155654104 14 8 1
  2740. 1482100898
  2741. 1482101846 -1 61 1
  2742. cannot be more than 8 characters (such as DOS), the names of
  2743. 155654128 13 12 1
  2744. 155649964
  2745. 155654128 14 8 1
  2746. 1348934804
  2747. 1482104222 42 82 1
  2748. 28 0 0
  2749. 1482104222 51 56 1
  2750. 1482104222 54 40 1
  2751. 1336346206 1332153310 0 0 162994250 0
  2752. 0 0
  2753. 1482104262 27 16 1
  2754. 18334 916 20999 33831
  2755. 1482104278 12 6 1
  2756. 155654884
  2757. 1
  2758. 1482104284 21 4 1
  2759. 1482097366
  2760. 1482104288 28 8 1
  2761. 18334 916
  2762. 155653744 13 12 1
  2763. 155653900
  2764. 155653744 14 8 1
  2765. 155653888
  2766. 1108282134 -1 60 1
  2767. e) Add another constructor that takes the style, length and
  2768. 155653000 13 12 1
  2769. 155648908
  2770. 155653000 14 8 1
  2771. 1108285290
  2772. 157220886 -1 19 1
  2773.         Class: int
  2774. 155654296 13 12 1
  2775. 155653768
  2776. 155654296 14 8 1
  2777. 155654056
  2778. 1482101406 -1 60 1
  2779. d) Both files contain several sections delimited by -MQBeg-
  2780. 155654224 13 12 1
  2781. 155654320
  2782. 155654224 14 8 1
  2783. 1348932836
  2784. 1482101286 -1 55 1
  2785. the generated files will be truncated to 8 characters.
  2786. 155653720 13 12 1
  2787. 155654416
  2788. 155653720 14 8 1
  2789. 1482096758
  2790. 155653900 13 12 1
  2791. 155654032
  2792. 155653900 14 8 1
  2793. 1482101614
  2794. 1108284030 -1 56 1
  2795. height as arguments. Set up the constructor as follows:
  2796. 155648908 13 12 1
  2797. 155650852
  2798. 155648908 14 8 1
  2799. 1108282730
  2800. 157228098 -1 24 1
  2801.         Access: private
  2802. 155653768 13 12 1
  2803. 155653924
  2804. 155653768 14 8 1
  2805. 163519382
  2806. 1482100898 -1 33 1
  2807. and -MQEnd-. Here is an example:
  2808. 155654320 13 12 1
  2809. 155654440
  2810. 155654320 14 8 1
  2811. 1482099930
  2812. 1332152018 42 82 1
  2813. 28 0 0
  2814. 1332152018 51 56 1
  2815. 1332152018 54 40 1
  2816. 1108284546 1482102902 0 0 162994250 0
  2817. 0 0
  2818. 1332152058 27 16 1
  2819. 498919 1164 529321 35496
  2820. 1332152074 12 6 1
  2821. 155648056
  2822. 21
  2823. 1332152080 21 4 1
  2824. 641144094
  2825. 1332152084 28 8 1
  2826. 498919 1164
  2827. 155653888 -1 8 1
  2828. inline 
  2829. 155654032 13 12 1
  2830. 155654176
  2831. 155654032 14 8 1
  2832. 1482101082
  2833. 1108285290 -1 41 1
  2834.         Check the Constructor check box.
  2835. 155650852 13 12 1
  2836. 155651536
  2837. 155650852 14 8 1
  2838. 1108279558
  2839. 1108280630 -1 58 1
  2840. implementation classes visible only in the source module.
  2841. 155653924 13 12 1
  2842. 155653624
  2843. 155653924 14 8 1
  2844. 163519254
  2845. 155650084 13 12 1
  2846. 155650408
  2847. 155650084 14 8 1
  2848. 1108283974
  2849. 155654440 13 12 1
  2850. 155654536
  2851. 155654440 14 8 1
  2852. 1482099478
  2853. 1482101614 -1 57 1
  2854. Rectangle::Rectangle(char style, int length, int height)
  2855. 155654176 13 12 1
  2856. 155654272
  2857. 155654176 14 8 1
  2858. 1482100606
  2859. 1108282730 -1 54 1
  2860.         Arguments: char style, int length, int height
  2861. 155651536 13 12 1
  2862. 155655892
  2863. 155651536 14 8 1
  2864. 155651716
  2865. 163519382 -1 71 1
  2866. c) Similarly add another attribute to class Rectangle called "Height":
  2867. 155653624 13 12 1
  2868. 155653396
  2869. 155653624 14 8 1
  2870. 163512446
  2871. 1482099930 -1 70 1
  2872. // -MQBeg- [Declarations_1] [Rectangle] <00000066.00000015> Retained!
  2873. 155654536 13 12 1
  2874. 155654632
  2875. 155654536 14 8 1
  2876. 1348930460
  2877. 1482101082 -1 74 1
  2878. // -MQBeg- [Op_Init] [Rectangle::Rectangle] <00000066.0000001C> Retained!
  2879. 155654272 13 12 1
  2880. 155654368
  2881. 155654272 14 8 1
  2882. 1482100198
  2883. 1108279558 -1 61 1
  2884.         Check the inline box to make the constructor inline.
  2885. 155655892 13 12 1
  2886. 155652460
  2887. 155655892 14 8 1
  2888. 1108286858
  2889. 163519254 -1 21 1
  2890.         Name: Height
  2891. 155653396 13 12 1
  2892. 155653096
  2893. 155653396 14 8 1
  2894. 163513810
  2895. 1482099478 -1 61 1
  2896. // -MQEnd- [Declarations_1] [Rectangle] <00000066.00000015> 
  2897. 155654632 13 12 1
  2898. 155654764
  2899. 155654632 14 8 1
  2900. 1482098246
  2901. 1482100606 -1 58 1
  2902.   : Shape(style)                //<-------- ADD THIS LINE
  2903. 155654368 13 12 1
  2904. 155654488
  2905. 155654368 14 8 1
  2906. 1348934516
  2907. 1482100814 24 22 1
  2908. 1 1 2 0 117440512 2 201326591 201326591
  2909. 155652460 13 12 1
  2910. 155651608
  2911. 155652460 14 8 1
  2912. 1108282934
  2913. 163512446 -1 19 1
  2914.         Class: int
  2915. 155653096 13 12 1
  2916. 155652892
  2917. 155653096 14 8 1
  2918. 155653276
  2919. 1482100506 -1 37 1
  2920. To do this simply choose File-Print.
  2921. 155654764 13 12 1
  2922. 155654836
  2923. 155654764 14 8 1
  2924. 1482097818
  2925. 1482100198 -1 65 1
  2926. // -MQEnd- [Op_Init] [Rectangle::Rectangle] <00000066.0000001C> 
  2927. 155654488 13 12 1
  2928. 155654584
  2929. 155654488 14 8 1
  2930. 1482099262
  2931. 1108286858 -1 48 1
  2932. f) Override the Draw() method from class Shape.
  2933. 155651608 13 12 1
  2934. 155653468
  2935. 155651608 14 8 1
  2936. 1108282450
  2937. 163513810 -1 24 1
  2938.         Access: private
  2939. 155652892 13 12 1
  2940. 155650612
  2941. 155652892 14 8 1
  2942. 163519186
  2943. 1482098246 -1 70 1
  2944. If the -MQBeg- line ends with the word "Retained!", the corresponding
  2945. 155654836 13 12 1
  2946. 155654932
  2947. 155654836 14 8 1
  2948. 1482097474
  2949. 155654416 13 12 1
  2950. 155655196
  2951. 155654416 14 8 1
  2952. 1336345962
  2953. 155654584 13 12 1
  2954. 155654704
  2955. 155654584 14 8 1
  2956. 1482098426
  2957. 1108282934 -1 30 1
  2958. Here's a shortcut to do this:
  2959. 155653468 13 12 1
  2960. 155653840
  2961. 155653468 14 8 1
  2962. 1108286166
  2963. 641146330 -1 30 1
  2964. - Other things to try (cont.)
  2965. 155650612 13 12 1
  2966. 155650888
  2967. 155650612 14 8 1
  2968. 163512378
  2969. 1482097818 -1 69 1
  2970. section is retained even if you regenerate code via S-CASE. In other
  2971. 155654932 13 12 1
  2972. 155655004
  2973. 155654932 14 8 1
  2974. 1482097134
  2975. 1482099262 -1 74 1
  2976. // -MQBeg- [Op_Body] [Rectangle::Rectangle] <00000066.0000001C> Retained!
  2977. 155654704 13 12 1
  2978. 155651344
  2979. 155654704 14 8 1
  2980. 1482097990
  2981. 1108282450 -1 50 1
  2982.         Click the "Operations: Inherited" button.
  2983. 155653840 13 12 1
  2984. 155653696
  2985. 155653840 14 8 1
  2986. 1108286394
  2987. 163519186 -1 66 1
  2988. d) Now add the default constructor to class Rectangle by clicking
  2989. 155650888 13 12 1
  2990. 155649628
  2991. 155650888 14 8 1
  2992. 163513766
  2993. 1482097474 -1 62 1
  2994. words, you can type anything between the -MQBeg- line and the
  2995. 155655004 13 12 1
  2996. 155651272
  2997. 155655004 14 8 1
  2998. 1482096834
  2999. 1482098426 -1 58 1
  3000.   Length=length; Height=height; //<-------- ADD THIS LINE
  3001. 1108286166 -1 45 1
  3002.         This shows the inherited operations.
  3003. 155653696 13 12 1
  3004. 155653996
  3005. 155653696 14 8 1
  3006. 1108284862
  3007. 163512378 -1 63 1
  3008. the "Operations: Add" button. Set up the operation as follows:
  3009. 155649628 13 12 1
  3010. 155649052
  3011. 155649628 14 8 1
  3012. 163519326
  3013. 1482097134 -1 65 1
  3014. corresponding -MQEnd- line and S-CASE will preserve this section
  3015. 1482097990 -1 65 1
  3016. // -MQEnd- [Op_Body] [Rectangle::Rectangle] <00000066.0000001C> 
  3017. 1108286394 -1 64 1
  3018.         Select the Draw() operation of Shape by clicking on it.
  3019. 155653996 13 12 1
  3020. 155654152
  3021. 155653996 14 8 1
  3022. 1108280814
  3023. 163513766 -1 41 1
  3024.         Check the Constructor check box.
  3025. 1482096834 -1 66 1
  3026. across code regenerations. All other areas of the source file are
  3027. 1108284862 -1 35 1
  3028.         Click the Override button.
  3029. 155654152 13 12 1
  3030. 155654344
  3031. 155654152 14 8 1
  3032. 155654248
  3033. 163519326 -1 49 1
  3034.         The method name is filled automatically.
  3035. 1108280814 -1 59 1
  3036. A copy of the Draw() method is now in the Rectangle class.
  3037. 155654344 13 12 1
  3038. 155654464
  3039. 155654344 14 8 1
  3040. 1108283386
  3041. 162992418 15 30 1
  3042. 40 6.000000 4.500000 1 13 0.100000
  3043. 155654464 13 12 1
  3044. 155654560
  3045. 155654464 14 8 1
  3046. 1108279762
  3047. 1108283386 -1 60 1
  3048. g) Double click on the Draw() method in the Rectangle class
  3049. 155654560 13 12 1
  3050. 155654680
  3051. 155654560 14 8 1
  3052. 1108279914
  3053. 1108279762 -1 63 1
  3054. to bring up its specification. Change the method to be virtual
  3055. 155654680 13 12 1
  3056. 155654788
  3057. 155654680 14 8 1
  3058. 155654860
  3059. 1108279914 -1 25 1
  3060. instead of pure virtual.
  3061. 155654788 13 12 1
  3062. 155654956
  3063. 155654788 14 8 1
  3064. 1108281086
  3065. 155650408 13 12 1
  3066. 155653564
  3067. 155650408 14 8 1
  3068. 1108285238
  3069. 155654956 13 12 1
  3070. 155655076
  3071. 155654956 14 8 1
  3072. 155655028
  3073. 1108281086 -1 44 1
  3074. h) Close the Rectangle class specification.
  3075. 155655076 13 12 1
  3076. 155655124
  3077. 155655076 14 8 1
  3078. 1108281614
  3079. 1482098986 64 61 1
  3080. S
  3081. 1482098986 31 60 1
  3082. 1482098986 50 60 1
  3083. 1482098986 51 56 1
  3084. 1482098986 54 40 1
  3085. 1337393266 162993982 0 0 162989814 0
  3086. 0 0
  3087. 1482099026 27 16 1
  3088. -1000 -1000 1000 1000
  3089. 1482099042 23 4 1
  3090. 162990442
  3091. 155655124 13 12 1
  3092. 155653348
  3093. 155655124 14 8 1
  3094. 1108283762
  3095. 1108281614 -1 56 1
  3096. i) Select the Rectangle class by clicking on it. Choose
  3097. 1108283762 -1 52 1
  3098. "Generate Code" from the actions menu to regenerate
  3099. 0 -1 -1 0
  3100.