/
eparameter_impl.go
85 lines (73 loc) · 2.7 KB
/
eparameter_impl.go
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// Code generated by soft.generator.go. DO NOT EDIT.
// *****************************************************************************
// Copyright(c) 2021 MASA Group
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
//
// *****************************************************************************
package ecore
// eParameterImpl is the implementation of the model object 'EParameter'
type eParameterImpl struct {
eTypedElementExt
}
// newEParameterImpl is the constructor of a eParameterImpl
func newEParameterImpl() *eParameterImpl {
eParameter := new(eParameterImpl)
eParameter.SetInterfaces(eParameter)
eParameter.Initialize()
return eParameter
}
func (eParameter *eParameterImpl) asEParameter() EParameter {
return eParameter.GetInterfaces().(EParameter)
}
func (eParameter *eParameterImpl) EStaticClass() EClass {
return GetPackage().GetEParameter()
}
func (eParameter *eParameterImpl) EStaticFeatureCount() int {
return EPARAMETER_FEATURE_COUNT
}
// GetEOperation get the value of eOperation
func (eParameter *eParameterImpl) GetEOperation() EOperation {
if eParameter.EContainerFeatureID() == EPARAMETER__EOPERATION {
return eParameter.EContainer().(EOperation)
}
return nil
}
func (eParameter *eParameterImpl) EGetFromID(featureID int, resolve bool) interface{} {
switch featureID {
case EPARAMETER__EOPERATION:
return eParameter.asEParameter().GetEOperation()
default:
return eParameter.eTypedElementExt.EGetFromID(featureID, resolve)
}
}
func (eParameter *eParameterImpl) EIsSetFromID(featureID int) bool {
switch featureID {
case EPARAMETER__EOPERATION:
return eParameter.GetEOperation() != nil
default:
return eParameter.eTypedElementExt.EIsSetFromID(featureID)
}
}
func (eParameter *eParameterImpl) EBasicInverseAdd(otherEnd EObject, featureID int, notifications ENotificationChain) ENotificationChain {
switch featureID {
case EPARAMETER__EOPERATION:
msgs := notifications
if eParameter.EInternalContainer() != nil {
msgs = eParameter.EBasicRemoveFromContainer(msgs)
}
return eParameter.EBasicSetContainer(otherEnd, EPARAMETER__EOPERATION, msgs)
default:
return eParameter.eTypedElementExt.EBasicInverseAdd(otherEnd, featureID, notifications)
}
}
func (eParameter *eParameterImpl) EBasicInverseRemove(otherEnd EObject, featureID int, notifications ENotificationChain) ENotificationChain {
switch featureID {
case EPARAMETER__EOPERATION:
return eParameter.EBasicSetContainer(nil, EPARAMETER__EOPERATION, notifications)
default:
return eParameter.eTypedElementExt.EBasicInverseRemove(otherEnd, featureID, notifications)
}
}