@=~ ~p typesetter = texinfo ~p maximum_input_line_length = infinity ******************************************** Makros zum Setzen und Transportieren von Werten ~$~+=~{ #ifdef __STDC__ #define STR(attr) #attr #else #define STR(attr) "attr" #endif #define SETPERS_STRING(attr, value) \ IF(strcmp(THIS.attr,value), PTGBasicCheckExecute(2,PTGSetAttr(_currn,STR(attr),value))) #define SETPERS_INT(attr, value) \ IF(NOT(EQ(THIS.attr,value)), PTGBasicCheckExecute(2,PTGSetAttr2(_currn,STR(attr),PTGNumb(value)))) #define DEFPERS_STRING(attr, value) \ IF(NOT(strcmp(THIS.attr,"")),SETPERS_STRING(attr,value)) #define VLTYPE_STRING VLCharPtr /* BUG: ersetzen durch VLString */ #define VLTYPE_INT int ~} Arg1: Datentyp (INT, STRING) Arg2: Quellsymbol (wird auch zur Namensgenerierung genutzt) Arg3: Quellattribut (z.B: THIS.attr) Arg4: Name der Querverbindung (z.B: attr) Arg5: Name der Property (wird auch zur Namensgenerierung genutzt) Arg6: Zielsymbol Arg7: persistentes Zielattribut (z.B: persAttr) Arg8: Defaultwert, wenn keine Verbindung existiert ~! SETPERS_~1(~7,Get~5(KEYOF(THIS.~4), ~8)) <- INCLUDING ROOTCLASS.all~2_~5Defined; ~$~~(~8~)~Z~M==~{ SYMBOL ROOT COMPUTE SYNT.all~2_~5Defined = CONSTITUENTS ~2.~5Defined; END; SYMBOL ~2 COMPUTE SYNT.~5Defined = Reset~5(KEYOF(THIS.~4), ~3); END; SYMBOL ~6: tmp_~7: VLTYPE_~1; SYMBOL ~6 COMPUTE SYNT.tmp_~7 = Get~5(KEYOF(THIS.~4), ~8) <- INCLUDING ROOTCLASS.all~2_~5Defined; SETPERS_~1(~7,THIS.tmp_~7); END; ~} **************************************************************************** Symbolklassen ~$~+=~{ SYMBOL ComponentNameClass END; SYMBOL ProcedureName INHERITS ComponentNameClass END; SYMBOL TaskName INHERITS ComponentNameClass END; SYMBOL Task INHERITS ComponentClass END; SYMBOL Procedure INHERITS ComponentClass END; SYMBOL Subtask INHERITS SubcomponentClass END; SYMBOL ProcedureCall INHERITS SubcomponentClass END; SYMBOL NormalPort INHERITS PortClass END; SYMBOL TopologyPort INHERITS PortClass END; SYMBOL TypeApplication INHERITS TypeApplicationClass END; SYMBOL PortClass INHERITS TypeApplicationClass END; SYMBOL FormalParamType INHERITS TypeApplicationClass END; ~} ***************************************************************************** Portinstanzen ~$~+=~{ $/Visual/InstanceModule.gnrc+instance=Component+referto=persComponent:inst ~} ~$~+=~{ Connected: bool; ~} ~$~+=~{ SYMBOL Connection COMPUTE SYNT.defined=ORDER( ResetConnected(KEYOF(THIS.persFrom),1), ResetConnected(KEYOF(THIS.persTo),1)); END; SYMBOL Task INHERITS IM_ComponentDefinition COMPUTE SYNT.allConnectionsDefined=CONSTITUENTS Connection.defined; END; SYMBOL Procedure INHERITS IM_ComponentDefinition COMPUTE SYNT.allConnectionsDefined=CONSTITUENTS Connection.defined; END; SYMBOL NormalPort INHERITS IM_ComponentInterface COMPUTE SYNT.IM_OblComponentInterfaceRepProduction="pSubport"; END; SYMBOL Subtask INHERITS IM_ComponentInstance END; SYMBOL ProcedureCall INHERITS IM_ComponentInstance END; SYMBOL SubcomponentPort INHERITS IM_ComponentInterfaceRep COMPUTE SYNT.IM_OptDeleteComponentInterfaceRep=NOT(GetConnected(KEYOF(THIS.persEndpoint),0)) <- INCLUDING ComponentClass.allConnectionsDefined; END; SYMBOL SubcomponentPortCreationNodeClass INHERITS IM_ComponentInterfaceRepCreationNode COMPUTE SYNT.IM_ComponentNodePtr=CONSTITUENT _List_SubcomponentPort.NodePtr; END; SYMBOL SubtaskEastPorts INHERITS SubcomponentPortCreationNodeClass END; SYMBOL ProcedureCallPorts INHERITS SubcomponentPortCreationNodeClass END; SYMBOL _List_SubcomponentPort: NodePtr: NODEPTR; SYMBOL _List_SubcomponentPort COMPUTE SYNT.NodePtr=_currn; END; ~} ********************************************************************** Prozedurparameter ~$~+=~{ $/Visual/InstanceModule.gnrc+instance=Procedure+referto=persComponent:inst ~} ~$~+=~{ SYMBOL Procedure INHERITS IM_ProcedureDefinition END; SYMBOL FormalParamElem INHERITS IM_ProcedureInterface COMPUTE SYNT.IM_OblProcedureInterfaceRepProduction="pProcedureCallArg"; END; SYMBOL ProcedureCall INHERITS IM_ProcedureInstance COMPUTE SYNT.IM_OptObtainProcedurePortOrder=1; END; SYMBOL ProcedureCallArg INHERITS IM_ProcedureInterfaceRep COMPUTE SYNT.IM_OptDeleteProcedureInterfaceRep= NOT(strcmp(CONSTITUENT ProcedureCallArgValue.persCode, "")); END; SYMBOL _List_ProcedureCallArg INHERITS IM_ProcedureInterfaceRepCreationNode END; ~} ************************************************************** Transportieren von Werten ~$~+=~{ Deleted: int; Name: VLCharPtr; PortDirection: int; PortDimension: int; Color: VLCharPtr; TypeName: VLCharPtr; ~} ~$~+=~{ SYMBOL FormalParamType: pers3DefName : VLString, pers3Deleted : VLInt, pers3TypeColor : VLString; SYMBOL NormalPort: pers3DefName : VLString, pers3Deleted : VLInt, pers3TypeColor : VLString; SYMBOL TopologyPort: pers3DefName : VLString, pers3Deleted : VLInt, pers3TypeColor : VLString; SYMBOL TypeApplication: pers3DefName : VLString, pers3Deleted : VLInt, pers3TypeColor : VLString; SYMBOL Subtask: pers3DefName : VLString, pers3Deleted : VLInt; SYMBOL ProcedureCall: pers3DefName : VLString, pers3Deleted : VLInt; SYMBOL SubcomponentPort: pers3DefName : VLString, pers3Direction : VLInt, pers3Dimension : VLInt, pers3Deleted : VLInt, pers3TypeColor : VLString; SYMBOL FormalParamHeadline: pers3ProcName : VLString; SYMBOL ProcedureCallArg: pers3Deleted : VLInt, pers3ArgName : VLString, pers3TypeName : VLString, pers3TypeColor : VLString; ~} ~$~+=~{ /* Name und Farbe von Typdefinitionen */ ~~(STRING~,Type~,CONSTITUENT TypeName.persColor~, persTypeDefInstConnection~,Color~,TypeApplicationClass~,pers3TypeColor~,"red"~) ~~(STRING~,Type~,CONSTITUENT TypeName.persName~, persTypeDefInstConnection~,Name~,TypeApplicationClass~,pers3DefName~,THIS.pers3DefName~) ~~(INT~,Type~,0~, persTypeDefInstConnection~,Deleted~,TypeApplicationClass~,pers3Deleted~,1~) /* verschiedenes */ ~~(STRING~,ComponentClass~,CONSTITUENT ComponentNameClass.persName~, persComponentDefInstConnection~,Name~,SubcomponentClass~,pers3DefName~,THIS.pers3DefName~) ~~(INT~,ComponentClass~,0~, persComponentDefInstConnection~,Deleted~,SubcomponentClass~,pers3Deleted~,1~) ~~(STRING~,NormalPort~,THIS.persName~, persComponentInterfaceDefInstConnection~,Name~,SubcomponentPort~,pers3DefName~,THIS.pers3DefName~) ~~(INT~,NormalPort~,THIS.persDirection~, persComponentInterfaceDefInstConnection~,PortDirection~,SubcomponentPort~,pers3Direction~,THIS.pers3Direction~) ~~(INT~,NormalPort~,THIS.persDimension~, persComponentInterfaceDefInstConnection~,PortDimension~,SubcomponentPort~,pers3Dimension~,THIS.pers3Dimension~) ~~(INT~,NormalPort~,0~, persComponentInterfaceDefInstConnection~,Deleted~,SubcomponentPort~,pers3Deleted~,1~) ~~(STRING~,NormalPort~,THIS.tmp_pers3TypeColor~, persComponentInterfaceDefInstConnection~,Color~,SubcomponentPort~,pers3TypeColor~,THIS.pers3TypeColor~) /* Prozedurparameternamen */ ~~(STRING~,FormalParamElem~,CONSTITUENT FormalParamName.persName~, persComponentInterfaceDefInstConnection~,Name~,ProcedureCallArg~,pers3ArgName~,THIS.pers3ArgName~) ~~(INT~,FormalParamElem~,0~, persComponentInterfaceDefInstConnection~,Deleted~,ProcedureCallArg~,pers3Deleted~,1~) ~~(STRING~,FormalParamElem~,CONSTITUENT FormalParamType.tmp_pers3DefName~, persComponentInterfaceDefInstConnection~,TypeName~,ProcedureCallArg~,pers3TypeName~,""~) ~~(STRING~,FormalParamElem~,CONSTITUENT FormalParamType.tmp_pers3TypeColor~, persComponentInterfaceDefInstConnection~,Color~,ProcedureCallArg~,pers3TypeColor~,"red"~) SYMBOL ProcedureDefinition: Name: VLCharPtr; SYMBOL ProcedureDefinition COMPUTE SYNT.Name=CONSTITUENT ProcedureName.persName; END; SYMBOL FormalParamHeadline COMPUTE SETPERS_STRING(pers3ProcName,INCLUDING ProcedureDefinition.Name); END; ~} ************************************************************* Setzen von Defaultwerten ~$~+=~{ SYMBOL TypeName COMPUTE DEFPERS_STRING(persColor,"black"); END; ~} ************************************************************* Generierung eindeutiger Namen ~$~+=~{ $/Visual/AutoNameModule.gnrc+referto=persName:inst $/Visual/AutoNameModule.gnrc+instance=Procedure+referto=persName:inst $/Visual/AutoNameModule.gnrc+instance=Task+referto=persName:inst $/Visual/AutoNameModule.gnrc+instance=Type+referto=persName:inst ~} ~$~+=~{ SYMBOL TaskInterface INHERITS AutoNameRoot COMPUTE SYNT.AutoNamePrefix="Port"; END; SYMBOL ProcedureInterface INHERITS AutoNameRoot COMPUTE SYNT.AutoNamePrefix="Port"; END; SYMBOL NormalPort INHERITS AutoNameClass END; SYMBOL TopologyPort INHERITS AutoNameClass END; SYMBOL SubElements INHERITS AutoNameRoot COMPUTE SYNT.AutoNamePrefix="SubtaskStart"; END; SYMBOL Subtask INHERITS AutoNameClass END; SYMBOL ComputerMappings INHERITS AutoNameRoot COMPUTE SYNT.AutoNamePrefix="VirtualComputer"; END; SYMBOL VirtualComputer INHERITS AutoNameClass END; SYMBOL Struct INHERITS AutoNameRoot COMPUTE SYNT.AutoNamePrefix="PartName"; END; SYMBOL StructElementName INHERITS AutoNameClass END; SYMBOL FormalParamTable INHERITS AutoNameRoot COMPUTE SYNT.AutoNamePrefix="Argument"; END; SYMBOL FormalParamName INHERITS AutoNameClass END; SYMBOL Components INHERITS ProcedureAutoNameRoot END; SYMBOL ProcedureName INHERITS ProcedureAutoNameClass END; SYMBOL Components INHERITS TaskAutoNameRoot END; SYMBOL TaskName INHERITS TaskAutoNameClass END; SYMBOL Components INHERITS TypeAutoNameRoot END; SYMBOL TypeName INHERITS TypeAutoNameClass END; ~} ~$~+=~{ SYMBOL TaskInterface: persAutoNameCounter: VLInt; SYMBOL ProcedureInterface: persAutoNameCounter: VLInt; SYMBOL SubElements: persAutoNameCounter: VLInt; SYMBOL ComputerMappings: persAutoNameCounter: VLInt; SYMBOL Struct: persAutoNameCounter: VLInt; SYMBOL FormalParamTable: persAutoNameCounter: VLInt; SYMBOL Components INHERITS ProcedureAutoNameRoot, TaskAutoNameRoot, TypeAutoNameRoot END; ~} ********************************************************************** Generierung der Dateien ~O~~{ ~ ~} ~O~~{ ~ ~} ~O~~{ ~ ~} ~O~~{ ~ ~}