Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: 79c653e9f259652739651f6a6d8e1f1ed8918ca3 (plain) (tree)
1
2
3
4
5
6
7
8
9
10



                                                                                                                                                                                                                                                                                    
                                                                      
            



                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
                                                 





                                                                                                                          
                                                                                                  
                                                                                         
                                                                                                         
                       
                                                                                                                           









                                                                                                                                       
                                               







                                                                                                                                                                                                                                                                                                    
                                                                                                  
                                                                                          
                                                                                                         
                       
                                                                                                                           









                                                                                                                                       
                                                                                                 





























                                                                                                                     
                                                                                                   

                      






















                                                                                              
                                                                              

                     




                                                                                           
                                                                                             




                                                                                                                 
                                                                                             

                                  
                                                                                             

                                  


                                                                                           
                                                                                             

                                  


                                                                                           
                                                                                             

                                  
                                                                                             

























                                                                                           



                                       
                                                                       



                                        
                                                                       



                                        
                                                                         



                                        
                                                                           



                                        
                                                                                



                                       
                                                                              



                                        
                                                                    



                                        


                                                                    

                                     
                                                                    



                                        
                                                                    



                                         
                                                                      



                                         
                                                                        



                                         
                                                                          



                                         
                                                                            



                                         
                                                                                 



                                       
                                                                              



                                         
                                                                          





                                        
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:mtl="http://www.eclipse.org/acceleo/mtl/3.0" xmlns:ocl.ecore="http://www.eclipse.org/ocl/1.1.0/Ecore">
  <mtl:Module name="traceOTF" nsURI="org::eclipse::papyrus::qompass::modellibs::tracing::acceleo::traceOTF" endHeaderPosition="57">
    <input>
      <takesTypesFrom href="http://www.eclipse.org/uml2/5.0.0/UML#/"/>
    </input>
    <ownedModuleElement xsi:type="mtl:Template" name="traceOp" visibility="Public">
      <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="&#xA;// &lt;instance>_&lt;port>_&lt;operation>&#xA;// easier: &lt;component>_&lt;port>_&lt;operation>&#xA;updateTimestamp ();&#xA;if (!hasDeclaredFunctions) {&#xA;&#x9;declareFunctions();&#xA;&#x9;hasDeclaredFunctions = true;&#xA;}&#xA;Tracing::TraceInit::wait();&#xA;int processID = Tracing::TraceInit::getProcessID();&#xA;OTF_Writer * writer = Tracing::TraceInit::getWriter();&#xA;OTF_Writer_writeEnter (writer, timestamp.ticks(), &lt;%enumSvcPrefix%>::id_&lt;%owner.varName%>_&lt;%varName%>, processID, 0);&#xA;OTF_Writer_writeEventComment (writer, timestamp.ticks(), processID, portName);&#xA;OTF_Writer_writeEventComment (writer, timestamp.ticks(), processID, instanceName);&#xA;Tracing::TraceInit::post();&#xA;"/>
      <body xsi:type="mtl:IfBlock">
        <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=" "/>
        <body xsi:type="mtl:TemplateExpression"/>
        <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=" ret = "/>
        <ifExpr xsi:type="ocl.ecore:OperationCallExp">
          <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
          <source xsi:type="ocl.ecore:OperationCallExp">
            <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
            <source xsi:type="ocl.ecore:PropertyCallExp">
              <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Type"/>
              <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/6">
                <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
              </source>
              <referredProperty xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation/type"/>
            </source>
            <argument xsi:type="ocl.ecore:NullLiteralExp">
              <eType xsi:type="ocl.ecore:VoidType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclVoid"/>
            </argument>
            <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny_Class/="/>
          </source>
          <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean_Class/not"/>
        </ifExpr>
      </body>
      <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol="rconn->"/>
      <body xsi:type="mtl:TemplateExpression"/>
      <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=";&#xA;updateTimestamp ();&#xA;Tracing::TraceInit::wait();&#xA;OTF_Writer_writeLeave (writer, timestamp.ticks(), &lt;%enumSvcPrefix%>::id_&lt;%owner.varName%>_&lt;%varName%>, processID, 0);&#xA;Tracing::TraceInit::post();&#xA;"/>
      <body xsi:type="mtl:IfBlock">
        <body xsi:type="ocl.ecore:StringLiteralExp" stringSymbol=" return ret;"/>
        <ifExpr xsi:type="ocl.ecore:OperationCallExp">
          <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
          <source xsi:type="ocl.ecore:OperationCallExp">
            <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean"/>
            <source xsi:type="ocl.ecore:PropertyCallExp">
              <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Type"/>
              <source xsi:type="ocl.ecore:VariableExp" name="self" referredVariable="/11">
                <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
              </source>
              <referredProperty xsi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation/type"/>
            </source>
            <argument xsi:type="ocl.ecore:NullLiteralExp">
              <eType xsi:type="ocl.ecore:VoidType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclVoid"/>
            </argument>
            <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny_Class/="/>
          </source>
          <referredOperation xsi:type="ecore:EOperation" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Boolean_Class/not"/>
        </ifExpr>
      </body>
      <parameter name="operation">
        <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
      </parameter>
    </ownedModuleElement>
  </mtl:Module>
  <ecore:EPackage name="additions">
    <eClassifiers xsi:type="ecore:EClass" name="String_Class">
      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
        <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
      </eAnnotations>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Integer_Class">
      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
        <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Integer"/>
      </eAnnotations>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Real_Class">
      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
        <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Real"/>
      </eAnnotations>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="EObject_Class">
      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
        <references href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
      </eAnnotations>
      <eOperations name="traceOp">
        <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
          <contents xsi:type="ocl.ecore:Constraint"/>
        </eAnnotations>
        <eAnnotations source="MTL" references="/0/traceOp"/>
        <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
        <eParameters name="operation">
          <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
        </eParameters>
      </eOperations>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="OclAny_Class">
      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
        <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OclAny"/>
      </eAnnotations>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Collection(T)_Class">
      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
        <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Collection(T)"/>
      </eAnnotations>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Sequence(T)_Class">
      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
        <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/Sequence(T)"/>
      </eAnnotations>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="OrderedSet(T)_Class">
      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
        <references href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/OrderedSet(T)"/>
      </eAnnotations>
    </eClassifiers>
    <eClassifiers xsi:type="ecore:EClass" name="Operation_Class">
      <eAnnotations source="http://www.eclipse.org/ocl/1.1.0/OCL">
        <references href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
      </eAnnotations>
    </eClassifiers>
  </ecore:EPackage>
  <ocl.ecore:Variable name="self">
    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
  </ocl.ecore:Variable>
  <ocl.ecore:Variable name="self">
    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
  </ocl.ecore:Variable>
  <ocl.ecore:Variable name="self">
    <eType xsi:type="ocl.ecore:PrimitiveType" href="http://www.eclipse.org/ocl/1.1.0/oclstdlib.ecore#/0/String"/>
  </ocl.ecore:Variable>
  <ocl.ecore:Variable name="self">
    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
  </ocl.ecore:Variable>
  <ocl.ecore:Variable name="self">
    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
  </ocl.ecore:Variable>
  <ocl.ecore:Variable name="self">
    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
  </ocl.ecore:Variable>
  <ocl.ecore:Variable name="self">
    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
  </ocl.ecore:Variable>
  <ocl.ecore:Variable name="self">
    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
  </ocl.ecore:Variable>
  <ocl.ecore:Variable name="self">
    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
  </ocl.ecore:Variable>
  <ocl.ecore:Variable name="self">
    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
  </ocl.ecore:Variable>
  <ocl.ecore:Variable name="self">
    <eType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
  </ocl.ecore:Variable>
  <ecore:EAnnotation source="positions">
    <eAnnotations source="positions.0" references="/0/traceOp">
      <details key="start" value="214"/>
      <details key="end" value="1211"/>
      <details key="line" value="6"/>
    </eAnnotations>
    <eAnnotations source="positions.1" references="/0/traceOp/%">
      <details key="start" value="262"/>
      <details key="end" value="883"/>
      <details key="line" value="7"/>
    </eAnnotations>
    <eAnnotations source="positions.2" references="/0/traceOp/%.1">
      <details key="start" value="883"/>
      <details key="end" value="935"/>
      <details key="line" value="22"/>
    </eAnnotations>
    <eAnnotations source="positions.3" references="/0/traceOp/%.1/%">
      <details key="start" value="905"/>
      <details key="end" value="906"/>
      <details key="line" value="22"/>
    </eAnnotations>
    <eAnnotations source="positions.4" references="/0/traceOp/%.1/%.1">
      <details key="start" value="-1"/>
      <details key="end" value="-1"/>
      <details key="line" value="0"/>
    </eAnnotations>
    <eAnnotations source="positions.5" references="/0/traceOp/%.1/%.2">
      <details key="start" value="923"/>
      <details key="end" value="930"/>
      <details key="line" value="22"/>
    </eAnnotations>
    <eAnnotations source="positions.6" references="/0/traceOp/%.1/%.3">
      <details key="start" value="887"/>
      <details key="end" value="904"/>
      <details key="line" value="0"/>
    </eAnnotations>
    <eAnnotations source="positions.7" references="/0/traceOp/%.1/%.3/%">
      <details key="start" value="891"/>
      <details key="end" value="904"/>
      <details key="line" value="0"/>
    </eAnnotations>
    <eAnnotations source="positions.8" references="/0/traceOp/%.1/%.3/%/%">
      <details key="start" value="892"/>
      <details key="end" value="896"/>
      <details key="line" value="0"/>
    </eAnnotations>
    <eAnnotations source="positions.9" references="/0/traceOp/%.1/%.3/%/%/self">
      <details key="start" value="-1"/>
      <details key="end" value="-1"/>
      <details key="line" value="0"/>
    </eAnnotations>
    <eAnnotations source="positions.10" references="/0/traceOp/%.1/%.3/%/%.1">
      <details key="start" value="899"/>
      <details key="end" value="903"/>
      <details key="line" value="0"/>
    </eAnnotations>
    <eAnnotations source="positions.11" references="/0/traceOp/%.2">
      <details key="start" value="935"/>
      <details key="end" value="942"/>
      <details key="line" value="22"/>
    </eAnnotations>
    <eAnnotations source="positions.12" references="/0/traceOp/%.3">
      <details key="start" value="-1"/>
      <details key="end" value="-1"/>
      <details key="line" value="0"/>
    </eAnnotations>
    <eAnnotations source="positions.13" references="/0/traceOp/%.4">
      <details key="start" value="964"/>
      <details key="end" value="1160"/>
      <details key="line" value="22"/>
    </eAnnotations>
    <eAnnotations source="positions.14" references="/0/traceOp/%.5">
      <details key="start" value="1160"/>
      <details key="end" value="1199"/>
      <details key="line" value="27"/>
    </eAnnotations>
    <eAnnotations source="positions.15" references="/0/traceOp/%.5/%">
      <details key="start" value="1182"/>
      <details key="end" value="1194"/>
      <details key="line" value="27"/>
    </eAnnotations>
    <eAnnotations source="positions.16" references="/0/traceOp/%.5/%.1">
      <details key="start" value="1164"/>
      <details key="end" value="1181"/>
      <details key="line" value="0"/>
    </eAnnotations>
    <eAnnotations source="positions.17" references="/0/traceOp/%.5/%.1/%">
      <details key="start" value="1168"/>
      <details key="end" value="1181"/>
      <details key="line" value="0"/>
    </eAnnotations>
    <eAnnotations source="positions.18" references="/0/traceOp/%.5/%.1/%/%">
      <details key="start" value="1169"/>
      <details key="end" value="1173"/>
      <details key="line" value="0"/>
    </eAnnotations>
    <eAnnotations source="positions.19" references="/0/traceOp/%.5/%.1/%/%/self">
      <details key="start" value="-1"/>
      <details key="end" value="-1"/>
      <details key="line" value="0"/>
    </eAnnotations>
    <eAnnotations source="positions.20" references="/0/traceOp/%.5/%.1/%/%.1">
      <details key="start" value="1176"/>
      <details key="end" value="1180"/>
      <details key="line" value="0"/>
    </eAnnotations>
    <eAnnotations source="positions.21" references="/0/traceOp/operation">
      <details key="start" value="239"/>
      <details key="end" value="259"/>
      <details key="line" value="6"/>
    </eAnnotations>
  </ecore:EAnnotation>
</xmi:XMI>

Back to the top