Go in the Java tab :תµ½java±êÇ©
The principle is the same, applied on Java. ÔÚJava±êÇ©ÄÚ£¬Ó¦ÓÃÏàͬµÄÔÔò¡£
It is not possible to see the Idl and Php definitions. Why ? Remember, at the beginning I ask you
- 25 -
set the toggle for C++ and Java in the Languages menu, so the definitions for the non toggled languages are hidden. Close the dialog hitting on ok, ask for all the languages through the menu Languages, reedit the attribute and go in the IDL tab :
ÔÚÕâÀïÊDz»¿ÉÄÜ¿´¼ûIDLºÍPhpµÄ¶¨Ò塣Ϊʲô£¿»ØÏëһϣ¬ÔÚ±¾½Ì³Ì¿ªÊ¼Ê±ÎÒÇëÇóÄãÔÚÓïÑԲ˵¥ÉÏÉèÖÃC++ºÍJavaÑ¡Öпª¹Ø£¬ÕâÑùµÄ»°ËùÓÐδѡÖеÄÓïÑÔ½«±»Òþ²Ø¡£°´OK°´Å¥¹Ø±Õ¶Ô»°¿ò£¬Í¨¹ýLanguages²Ëµ¥£¬Ñ¡ÖÐËùÓÐÓïÑÔ£¬ÔÙÀ´ÊôÐÔ£¬×ªµ½IDL±êÇ©¡£
The declaration is empty ! This is also because Idl was not set in the menu Languages. Hitting the button Default State declaration we have : ÉùÃ÷(declaration)Êǿյģ¬Õ⻹ÊÇÒòΪδÔÚLanguages ÉÏÉèÖÃIdl¡£°´Default State declaration °´Å¥£¬ÎÒÃÇÓУº
- 26 -
First the visibility is private rather than protected because protected doesn't exist. Ê×ÏÈ£¬µÄ¿É¼ûÐÔÊÇ˽ÓеĶø²»ÊDZ£»¤µÄ£¬ÒòprotectedÔÚIDLÖв»´æÔÚ¡£
Furthermore ${type} is replaced by long rather than int, this is because the type int doesn't exist in IDL, and the better target is long, magic !
ÆäÏ£¬$(type) ÓÉ long Ìæ»»£¬¶ø²»ÊÇint, ÕâÒ²ÊÇÒòΪÔÚIDLÖв»´æÔÚint ÀàÐÍ£¬¶ø×îºÃÄ¿±êÀàÐÍÊÇlong, Ì«ÆæÁË£¡
They are other type conversions automatically done by BOULM, for instance if you choose any in UML you will have void * in C++, Object in Java and any in IDL. Obviously these conversions are not hard coded, they are set through the generation settings.
ËüÃǶ¼ÊÇÓÉBOUML×Ô¶¯µØ×ª»»ÀàÐÍ£¬ÀýÈçÄãÔÚUMLÖÐÑ¡ÔñanyÀàÐÍ£¬ÄãÄÜÔÚC++Öеõ½VoidÀàÐÍ£¬JavaÖеõ½Object ÀàÐÍ£¬¶øÔÚODLÖеõ½ anyÀàÐÍ¡£ÏÔÈ»µÄÕâЩת»»²»ÊÇÓ²±àÂëÍê³ÉµÄ£¬¶øÊÇ¿ÉÒÔÓà generation settings ½øÐÐÉèÖõġ£ Go in the Php tab and ask for the default declaration : תµ½Php±êÇ©£¬ÇëÇóÆäĬÈϵÄÉùÃ÷
This is a definition for Php5, if you want to use Php4 the better is to change the visibility to package, and the definition will be :
ÕâÊÇPhp5µÄ¶¨Ò壬Èç¹ûÄãÏëʹÓÃPhp4£¬×îºÃµÄ·½·¨ÊÇÕë¶Ôpackage ¸Ä±ä¿É¼ûÐÔ£¬ÔòÆä¶¨Ò彫ÊÇ£º
- 27 -
The definitions given the default forms with the keywords may also be modified through the generation settings, this allows you to add the '_' to name the attribute in C++ as above etc ... look at the reference manual for more. Remark : when you change the generation settings, the definition of the already existing elements is not changed.
¹Ø¼ü×ֵ͍Ò壨¸ø³öÒ»Ò»¸öĬÈϵÄÑù×Ó£©Ò²Äܹ»Í¨¹ýgeneration settings ½øÐÐÐ޸ġ£ËüÔÊÐíÄãÔÚC++µÄ´úÂëÄÚÔÚÊôÐÔÃûǰ¼ÓÉÏ¡®_¡¯£¬ÈçÉÏËùÊö¡£¸ü¶àµÄ˵Ã÷£¬²ÎÔÄÊֲᡣ±¸×¢£ºµ±Äã¸ü¸Ägeneration settings £¬ÒѾ´æÔÚµÄÔªËØµÄ¶¨Òå²¢²»¸Ä±ä¡£ Hit ok to validate the changes. °´OK УÑé¸ü¸ÄµÄºÏ·¨ÐÔ
Class drawing settingsÀà»æÖÆÉèÖà In the class diagram only the name of the attribute and the operation are visible, not the types nor the visibility, call the class menu in the diagram and change three drawing settings like this :
ÔÚÀàͼÖУ¬½ö¿É¼ûµ½ÊôÐÔÃûºÍ²Ù×÷Ãû£¬¼´¼û²»µ½ÀàÐÍÒ²²»¼ûÆä¿É¼ûÐÔ£¬µ÷ÓÃÀàµÄ¹ØÁª²Ëµ¥£¬¸Ä±äÈý¸ödrawing settings ÈçÏ£º
- 28 -