/* Module ut/RoseUt /ROSE.ic ***************************************************************************** Authors GRT */ #include for_spu.h
struct  mo_Class
{ mo_Class :: mo_Class(); uint deep ; char * nam ; }
struct  mo_Operation
{ mo_Operation :: mo_Operation(); char * nam ; char * res ; char * exp ; }
struct  mo_Parameter
{ mo_Parameter :: mo_Parameter(); char * nam ; char * typ ; }
struct  E_Actor
{ E_Actor :: E_Actor(); char * name ; char * cls ; char * comm ; int nr ; E_Actor * next ; }
struct  E_DoWrk
{ E_DoWrk :: E_DoWrk(); char * name ; char * from ; char * to ; int nr_from ; int nr_to ; int nr ; E_DoWrk * next ; E_Diagr * diagr ; }
struct  E_Text
{ E_Text :: E_Text(); char * text ; E_Text * next ; // }
struct  E_Diagr
{ E_Diagr :: E_Diagr(); char * name ; E_Actor * actor ; // 1st Actor (= Spalte des Diagramms) E_DoWrk * dowrk ; // 1st DoWrk (= Zeile des Diagramms) E_Text * text ; // sogenannte 'Label' in Diagrammen E_Diagr * next ; }
struct  E_Param
{ E_Param :: E_Param(); char * name ; char * type ; char * comm ; // Rose says: documentation char * access ; E_Param * next ; // }
struct  E_Metho
{ E_Metho :: E_Metho(); char * at_rr ; // char * at_ww ; // char * comm ; // comment char * name ; char * type ; char * access ; int type_L ; E_Param * par ; // a set of formal parameters E_Metho * next ; // int n_params ; // number of parameters }
struct  E_Arrow
{ E_Arrow :: E_Arrow(); char * type ; // char * name ; // char * comm ; // char * to ; // char * card ; // cardinality E_Arrow * next ; // }
struct  E_CAttr
{ E_CAttr :: E_CAttr(); char * name ; // of data E_CAttr * next ; // }
struct  E_Class
{ E_Class :: E_Class(); char * at_rr ; // char * at_ww ; // char * comm ; // comment char * name ; char * NameSpacece ; char * access ; E_Arrow * a ; // a set of relationships (arrows) E_CAttr * attr ; // a set of data members E_Metho * meth ; // a set of methods E_Class * next ; // E_Diagr * diagr ; // a set of InterAction Diagrams int n_diagr ; // number of diagrams int n_meth ; // number of methods int n_attr ; // number of attributes int n_has ; // number of ''has relationships }
struct  E_Space
{ E_Space :: E_Space(); char * comm ; // comment char * name ; char * access ; E_Class * c ; // a set E_Space * next ; // a set E_Diagr * diagr ; // a set of InterAction Diagrams int n_classes ; // number of classes }
union  Current
{ E_Space * s ; // E_Class * c ; // E_Metho * m ; // E_Param * p ; // };
class RoseUt
/* _____________________________________________________________________________ R e u s e . f o r . Rational ROSE . ERBIS for reading the content of design created with the help of Rational Rose _ TheBestellvorgang: TheKommunication: versende( BestellungZIS ) TheZENTAUR: konvBestellung( ... ) TheZENTAUR: konvBestellung( ... ) TheZENTAUR: konvBestellung( ... ) TheKommunication: TheZENTAUR. konvBestellung( ... ) (object InteractionDiagram "Kommunikation mit ZENTAUR" mechanism_ref @6 title "Kommunikation mit ZENTAUR" zoom 100 max_height 28350 max_width 21600 origin_x 0 origin_y 0 items (list diagram_item_list (object InterObjView "TheBestellvorgang" @55 location (1143, 225) font (object Font size 10 face "helvetica" bold FALSE italics FALSE underline FALSE strike FALSE color 0 default_color TRUE) label (object ItemLabel location (1143, 225) anchor_loc 1 nlines 2 max_width 300 justify 0 label "TheBestellvorgang") width 300 height 1080) (object InterObjView "TheBestellung_ZIS" @56 location (1476, 225) font (object Font size 10 face "helvetica" bold FALSE italics FALSE underline FALSE strike FALSE color 0 default_color TRUE) label (object ItemLabel location (1476, 225) anchor_loc 1 nlines 2 max_width 300 justify 0 label "TheBestellung_ZIS") width 300 height 1080) (object InterMessView "" location (0, 369) font (object Font size 10 face "helvetica" bold FALSE italics FALSE underline FALSE strike FALSE color 0 default_color TRUE) label (object SegLabel location (1503, 326) anchor_loc 1 nlines 1 max_width 1181 justify 0 label "versende (BestellungZIS)" pctDist 0.540541 height 44 orientation 0) client @55 supplier @57 origin (1143, 369) terminus (1809, 369) ordinal 0) (object InterMessView "" location (0, 486) font (object Font size 10 face "helvetica" bold FALSE italics FALSE underline FALSE strike FALSE color 0 default_color TRUE) label (object SegLabel location (2181, 451) anchor_loc 1 nlines 1 max_width 903 justify 0 label "konvBestellungZentaur (BestellungZIS)" pctDist 1.11712 height 36 orientation 0) client @57 supplier @58 origin (1809, 486) terminus (2142, 486) ordinal 1) (object SelfMessView "" location (0, 603) font (object Font size 10 face "helvetica" bold FALSE italics FALSE underline FALSE strike FALSE color 0 default_color TRUE) label (object SegLabel location (2521, 559) anchor_loc 1 nlines 1 max_width 890 justify 0 label "versBestellungZentaur (BestellungZIS)" pctDist 2.53333 height 45 orientation 0) client @58 supplier @58 origin (2142, 603) terminus (2292, 603) ordinal 2) Rational Rose Utilities Mittels Rational Rose modelliertes Design Durch - gekennzeichnete Konzepte werden schon ins Klassenformular bernommen: object Attribute object CategoryView - object Class object ClassDiagram object ClassView - object Class_Category object Compartment object Design object Font object HasView - object Has_Relationship object InheritView object Inheritance_Relationship - object InterMessView - object InterObjView - object InteractionDiagram object ItemLabel object Label object Link object Mechanism object Message object Module_Diagram object Object - object Operation - object Parameter object Petal object Process_Diagram object Processes object Properties object SegLabel - object SelfMessView object Semantic_Info object SubSystem object UsesView - object Uses_Relationship - object Visibility_Relationship object defaults Here is the format that Rational Rose files *.cat have: (object Petal version 35) (object Class_Category "AAM" is_unit TRUE is_loaded TRUE exportControl "Public" logical_models (list unit_reference_list (object Class "Aufenthaltsort" attributes (list Attribute_Set (object Attribute tool "Traversal" name "CodeFile" value "$INCLUDES/AD/AAM/Aufenthaltsort.h")) fields (list has_relationship_list (object Has_Relationship supplier "AAM_Schnittstelle" Containment "By Value" supplier_cardinality (value cardinality "1..n")) (object Has_Relationship supplier "AAM_GUI" Containment "By Value" supplier_cardinality (value cardinality "1")) (object Has_Relationship supplier "AAM_SQL" Containment "By Value" supplier_cardinality (value cardinality "1"))) used_nodes (list uses_relationship_list (object Uses_Relationship supplier "SUR_Schnittstelle" supplier_cardinality (value cardinality "1")) (object Uses_Relationship supplier "ABW_Schnittstelle" supplier_cardinality (value cardinality "1")) (object Uses_Relationship supplier "DPL_Schnittstelle" supplier_cardinality (value cardinality "1")) (object Uses_Relationship supplier "PersonalnummerListe" supplier_cardinality (value cardinality "1..n")) space "23" operations (list Operations (object Operation "oeffneAufenthaltsort" concurrency "Sequential" opExportControl "Public" uid 814437930) (object Operation "selektiereMitarbeiter" documentation "Selektier die anzuzeigenden Mitarber parameters (list Parameters (object Parameter "mitarbeiter" type "Mitarbeiter") (object Parameter "dienstplan_beginn" type "Zeitpunkt") (object Parameter "dienstplan_ende" type "Zeitpunkt") (object Parameter "abwesenheit_liste" type "AbwesenheitListe") (object Parameter "aktuelle_uhrzeit" type "Uhrzeit")) concurrency "Sequential" opExportControl "Public" uid 814437931) (object Operation "alleMitarbeiterDerOrgEAnzeigen" result "MitarbeiterListe" concurrency "Sequential" opExportControl "Public" uid 814437932) (object Operation "aTDZ" Relationships are for Code Generation: Uses_Relationships: When the C++ Code Generator produces code for the class (the ''client) that ''uses another class (the ''supplier), an #include referencing the file that contains the supplier class is generated. Has_Relationships: The ''client class is given a private data member of type ''supplier. or set of ''suppliers if the relationships cardinality is not "1". Also get_... and set_... member functions are generated. Inheritance_Relationships: The ''client class spezializes the ''supplier class. Instantiates_Relationships: Here the code generator produces a ''typedef in the header file for the instantiated template (the ''supplier class). Unadorned Association Relationships are less precise than a ''has or ''uses Relationship. For them no code can be generated. These relationships are . Visibility_Relationship _____________________________________________________________________________ */ { public: private:
enum  privateConstants
top . is_inc_for . C++
{ max_actor = 800 , mL_anfo = 15000 , mL_an = 15000 } ; E_Diagr * diagrams ; // our set of interaction diagrams E_Space * spaces ; // our set of spaces E_Space * at_space ; E_Diagr * at_diagr ; E_Class * at_class ; E_Arrow * at_arrow ; E_Metho * at_metho ; E_Param * at_param ; E_Actor * at_actor ; E_DoWrk * at_dowrk ; E_Text * at_text ; char * NameSpacece ; char * sys ; char * aufrufer ; char * gerufener ; char * actor[ max_actor ] ; char * H0 ; // see Constructor char * H1 ; // see Constructor char * H2 ; // see Constructor char * H3 ; // see Constructor char * H4 ; // see Constructor char * Hf ; // see Constructor BOOL pure_ascii ; // see Constructor BOOL countActions ; int anzActions ; int formed_param ; int type_L ; int all_comment ; FILE * f1 ; // erweiterte ERDs FILE * fo ; // Klassenformulare str_set store ; // for names & comments str_set classes ; // name of all classes specified str_set objects ; // in the Rose Report 'all objects' str_set actors ; // name of all actors in diagrams str_set methods_C ; // all methods of Classes in *.ic str_set methods_D ; // all methods in Diagrams str_set methods_A ; // all methods in anf_die.doc str_set methods_a ; // union of methods_D and methods_A str_set actions ; // in the diagrams str_set has ; // name of all ''has destinations str_set uses ; // name of all ''uses destinations str_set para ; // name of all parameter types str_set anfordere ; // die Anforderungen aus ANF_DIE.doc char anfo[ mL_anfo ] ; char an [ mL_an ] ; char nst[ 10000 ] ; char * spwert[ 32 ] ; path nirgendwo ; path punkt ; // exported methods: public: RoseUt :: RoseUt /* ----------------------------------------------------------------------------- Der Aufrufer sagt: Die Funktion garantiert: fErr || ok ----------------------------------------------------------------------------- */ ( char * form ) ; public: void RoseUt :: show_model_structure /* ----------------------------------------------------------------------------- create the skeleton 'cat.sk: The model to be shown to Gebhard ----------------------------------------------------------------------------- */ ( char * cat , char * j2h ) ; public: void RoseUt :: CashObjects /* ----------------------------------------------------------------------------- Der Aufrufer sagt: Hole alle in ''cat definierten Objekte nach ''(this -> objects). Hinweis: Sie in einer Summe ''cat von *.cat Dateien direkt zu finden ist besser als einen durch Rational Rose erzeugten Report zu Rete zu ziehen. Deswegen ersetzt diese Methode die zuerst definierte Methode CashObjOfClass(). So sieht ein Object in *.cat aus (Example): (object Object "TheWeitermeldungslisteSendendeOrgE" collaborators (list link_list (object Link supplier "ThePoolEmpfangendeOrgE" messages (list Messages (object Message "schreibeMeldung ( )" frequency "Aperiodic" synchronization "Simple" dir "FromClientToSupplier" sequence "" ordinal 4))) (object Link supplier "TheTUE_S" messages (list Messages (object Message "merkenErinnerungstermin" frequency "Aperiodic" synchronization "Simple" dir "FromClientToSupplier" sequence "" ordinal 7 Operation "merkenErinnerungstermin")))) class "WeitermeldungsListe" persistence "Transient" multi FALSE) Die Funktion garantiert: fErr || ok ----------------------------------------------------------------------------- */ ( char * catfile ) ; public: void RoseUt :: CashObjOfClass /* ----------------------------------------------------------------------------- Der Aufrufer sagt: Hole den Rational Rose Report ''(All Objects defined) nach ''(this -> objects). Der Report ist nicht lexikographisch geordnet und kann Objekte durchaus auch mehrfach enthalten: Object name: TheWeitermeldung Class: Weitermeldung Persistence: Transient Object name: TheAUF_SQL Class: AUF_SQL Persistence: Transient . . . Die Funktion garantiert: fErr || ok ----------------------------------------------------------------------------- */ ( char * rep_o ) ; public: void RoseUt :: RoseToClassform /* ----------------------------------------------------------------------------- Der Aufrufer sagt: Transformiere ''from (eine Datei im Rational Rose Format *.cat) nach ''to unter Nutzung des Formats der Klassenformulare. Die Funktion garantiert: fErr || ok ----------------------------------------------------------------------------- */ ( char * s , char * from //, char * to // ) ; public: void RoseUt :: aus_WinWord /* ----------------------------------------------------------------------------- Der Aufrufer sagt: Merge a class description found in WinWord format. This description was normed by WinWord :: ClassDescr(). Die Funktion garantiert: fErr || ok ----------------------------------------------------------------------------- */ ( char * from ) ; public: void RoseUt :: getSpaltenWerte /* ----------------------------------------------------------------------------- Der Aufrufer sagt: Lese die nchsten ''n Werte {<wert>} . Die Funktion garantiert: fErr || ok ----------------------------------------------------------------------------- */ ( int anz , rBuffer & B ) ; public: void RoseUt :: cash_Anforderungen /* ----------------------------------------------------------------------------- Der Aufrufer sagt: Frage ANF_DIE.rtf nach einer Spezifikation aller Anforderungen an die subsystem-bergreifenden Schnittstellen. Die Funktion garantiert: fErr || ok ----------------------------------------------------------------------------- */ ( char * an_sys ) ; public: void RoseUt :: gen_ERD /* ----------------------------------------------------------------------------- Der Aufrufer sagt: Cash report.cat Die Funktion garantiert: fErr || ok ----------------------------------------------------------------------------- */ ( ) ; #include roseut.h3 : cpp } ; #endif