Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: 501c9db39ade9880feaaf92c1a12fb00e19cefe8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage 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" name="lookup" nsURI="http://cs2as/tests/example2/env/1.0" nsPrefix="lookup">
  <eAnnotations source="http://www.eclipse.org/OCL/Import">
    <details key="classes" value="Classes.ecore#/"/>
  </eAnnotations>
  <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
    <details key="invocationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
    <details key="settingDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
    <details key="validationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
  </eAnnotations>
  <eClassifiers xsi:type="ecore:EClass" name="LookupEnvironment" eSuperTypes="#//Env4CG">
    <eOperations name="addElements" lowerBound="1" eType="#//LookupEnvironment">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="elements->iterate(x : classes::NamedElement ; acc : LookupEnvironment = self | acc.addElement(x))"/>
      </eAnnotations>
      <eTypeParameters name="NE">
        <eBounds eClassifier="ecore:EClass Classes.ecore#//NamedElement"/>
      </eTypeParameters>
      <eParameters name="elements" lowerBound="1">
        <eGenericType eClassifier="ecore:EClass platform:/plugin/org.eclipse.ocl.pivot/model-gen/oclstdlib.ecore#//Collection">
          <eTypeArguments eTypeParameter="#//LookupEnvironment/addElements/NE"/>
        </eGenericType>
      </eParameters>
    </eOperations>
    <eOperations name="addElement" lowerBound="1" eType="#//LookupEnvironment">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="addElementWithName(element.name, element)"/>
      </eAnnotations>
      <eParameters name="element" lowerBound="1" eType="ecore:EClass Classes.ecore#//NamedElement"/>
    </eOperations>
    <eOperations name="addElementWithName" lowerBound="1" eType="#//LookupEnvironment">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="let entry = entries->select(name = entryName)&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;in LookupEnvironment {&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;entries = if entry = null &#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;then entries->including( EnvEntry {name=entryName, namedElements = OrderedSet{element}} )&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;else entries->excluding(entry)->including( EnvEntry {name=entryName, namedElements = entry.namedElements->including(element)})&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;&#x9;endif&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;}&#xA;&#x9;&#x9;&#x9;&#xA;&#x9;&#x9;&#x9;"/>
      </eAnnotations>
      <eParameters name="entryName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
      <eParameters name="element" lowerBound="1" eType="ecore:EClass Classes.ecore#//NamedElement"/>
    </eOperations>
    <eOperations name="getNamedElements" upperBound="-1" eType="ecore:EClass Classes.ecore#//NamedElement">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="let entry = entries->select(name = entryName)&#xA;&#x9;&#x9;&#x9;&#x9;in if entry = null then OrderedSet(classes::NamedElement){} else entry.namedElements endif"/>
      </eAnnotations>
      <eParameters name="entryName" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="entries" upperBound="-1"
        eType="#//EnvEntry" containment="true" eOpposite="#//EnvEntry/env"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="parentEnv" eType="#//LookupEnvironment"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Env4CG" abstract="true" interface="true">
    <eOperations name="hasFinalResult" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
        <details key="body" value="throw new &lt;%java.lang.UnsupportedOperationException%>(&quot;LookupEnvironment::hasFinalResult() has been created for CG purposes. Don't call this method&quot;);"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="getExecutor" eType="#//Executor">
      <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
        <details key="body" value="throw new &lt;%java.lang.UnsupportedOperationException%>(&quot;LookupEnvironment::getEvaluator() has been created for CG purposes. Don't call this method&quot;);"/>
      </eAnnotations>
    </eOperations>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EnvEntry">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="namedElements" lowerBound="1"
        upperBound="-1" eType="ecore:EClass Classes.ecore#//NamedElement"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="env" eType="#//LookupEnvironment"
        eOpposite="#//LookupEnvironment/entries"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Executor" instanceClassName="org.eclipse.ocl.pivot.evaluation.Executor"
      abstract="true" interface="true"/>
</ecore:EPackage>

Back to the top