diff options
Diffstat (limited to 'extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/util/C_CppSwitch.java')
-rw-r--r-- | extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/util/C_CppSwitch.java | 391 |
1 files changed, 245 insertions, 146 deletions
diff --git a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/util/C_CppSwitch.java b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/util/C_CppSwitch.java index 57b256b7755..2878ae1ec87 100644 --- a/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/util/C_CppSwitch.java +++ b/extraplugins/codegen/org.eclipse.papyrus.cpp.profile/src/org/eclipse/papyrus/C_Cpp/util/C_CppSwitch.java @@ -1,14 +1,14 @@ /** * Copyright (c) 2013 CEA LIST - * + * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License v1.0 which * accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html - * + * * Contributors: * CEA LIST - Initial API and implementation - * + * */ package org.eclipse.papyrus.C_Cpp.util; @@ -22,13 +22,13 @@ import org.eclipse.papyrus.C_Cpp.*; /** * <!-- begin-user-doc --> * The <b>Switch</b> for the model's inheritance hierarchy. - * It supports the call {@link #doSwitch(EObject) doSwitch(object)} - * to invoke the <code>caseXXX</code> method for each class of the model, + * It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model, * starting with the actual class of the object * and proceeding up the inheritance hierarchy * until a non-null result is returned, * which is the result of the switch. * <!-- end-user-doc --> + * * @see org.eclipse.papyrus.C_Cpp.C_CppPackage * @generated */ @@ -37,6 +37,7 @@ public class C_CppSwitch<T> extends Switch<T> { * The cached model package * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ protected static C_CppPackage modelPackage; @@ -45,6 +46,7 @@ public class C_CppSwitch<T> extends Switch<T> { * Creates an instance of the switch. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @generated */ public C_CppSwitch() { @@ -57,6 +59,7 @@ public class C_CppSwitch<T> extends Switch<T> { * Checks whether this is a switch for the given package. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @parameter ePackage the package in question. * @return whether this is a switch for the given package. * @generated @@ -70,151 +73,199 @@ public class C_CppSwitch<T> extends Switch<T> { * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. * <!-- begin-user-doc --> * <!-- end-user-doc --> + * * @return the first non-null result returned by a <code>caseXXX</code> call. * @generated */ @Override protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { - case C_CppPackage.PTR: { - Ptr ptr = (Ptr)theEObject; - T result = casePtr(ptr); - if (result == null) result = defaultCase(theEObject); - return result; + case C_CppPackage.PTR: { + Ptr ptr = (Ptr) theEObject; + T result = casePtr(ptr); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.INCLUDE: { - Include include = (Include)theEObject; - T result = caseInclude(include); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.INCLUDE: { + Include include = (Include) theEObject; + T result = caseInclude(include); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.MANUAL_GENERATION: { - ManualGeneration manualGeneration = (ManualGeneration)theEObject; - T result = caseManualGeneration(manualGeneration); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.MANUAL_GENERATION: { + ManualGeneration manualGeneration = (ManualGeneration) theEObject; + T result = caseManualGeneration(manualGeneration); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.EXTERN_LIBRARY: { - ExternLibrary externLibrary = (ExternLibrary)theEObject; - T result = caseExternLibrary(externLibrary); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.EXTERN_LIBRARY: { + ExternLibrary externLibrary = (ExternLibrary) theEObject; + T result = caseExternLibrary(externLibrary); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.NO_CODE_GEN: { - NoCodeGen noCodeGen = (NoCodeGen)theEObject; - T result = caseNoCodeGen(noCodeGen); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.NO_CODE_GEN: { + NoCodeGen noCodeGen = (NoCodeGen) theEObject; + T result = caseNoCodeGen(noCodeGen); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.CPP_ROOT: { - CppRoot cppRoot = (CppRoot)theEObject; - T result = caseCppRoot(cppRoot); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.CPP_ROOT: { + CppRoot cppRoot = (CppRoot) theEObject; + T result = caseCppRoot(cppRoot); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.ARRAY: { - Array array = (Array)theEObject; - T result = caseArray(array); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.ARRAY: { + Array array = (Array) theEObject; + T result = caseArray(array); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.CONST: { - Const const_ = (Const)theEObject; - T result = caseConst(const_); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.CONST: { + Const const_ = (Const) theEObject; + T result = caseConst(const_); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.REF: { - Ref ref = (Ref)theEObject; - T result = caseRef(ref); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.REF: { + Ref ref = (Ref) theEObject; + T result = caseRef(ref); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.EXTERNAL: { - External external = (External)theEObject; - T result = caseExternal(external); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.EXTERNAL: { + External external = (External) theEObject; + T result = caseExternal(external); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.CONST_INIT: { - ConstInit constInit = (ConstInit)theEObject; - T result = caseConstInit(constInit); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.CONST_INIT: { + ConstInit constInit = (ConstInit) theEObject; + T result = caseConstInit(constInit); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.FRIEND: { - Friend friend = (Friend)theEObject; - T result = caseFriend(friend); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.FRIEND: { + Friend friend = (Friend) theEObject; + T result = caseFriend(friend); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.INLINE: { - Inline inline = (Inline)theEObject; - T result = caseInline(inline); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.INLINE: { + Inline inline = (Inline) theEObject; + T result = caseInline(inline); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.VIRTUAL: { - Virtual virtual = (Virtual)theEObject; - T result = caseVirtual(virtual); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.VIRTUAL: { + Virtual virtual = (Virtual) theEObject; + T result = caseVirtual(virtual); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.TYPEDEF: { - Typedef typedef = (Typedef)theEObject; - T result = caseTypedef(typedef); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.TYPEDEF: { + Typedef typedef = (Typedef) theEObject; + T result = caseTypedef(typedef); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.VISIBILITY: { - Visibility visibility = (Visibility)theEObject; - T result = caseVisibility(visibility); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.VISIBILITY: { + Visibility visibility = (Visibility) theEObject; + T result = caseVisibility(visibility); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.CPP_INIT: { - CppInit cppInit = (CppInit)theEObject; - T result = caseCppInit(cppInit); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.CPP_INIT: { + CppInit cppInit = (CppInit) theEObject; + T result = caseCppInit(cppInit); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.TEMPLATE: { - Template template = (Template)theEObject; - T result = caseTemplate(template); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.TEMPLATE: { + Template template = (Template) theEObject; + T result = caseTemplate(template); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.TEMPLATE_BINDING: { - TemplateBinding templateBinding = (TemplateBinding)theEObject; - T result = caseTemplateBinding(templateBinding); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.TEMPLATE_BINDING: { + TemplateBinding templateBinding = (TemplateBinding) theEObject; + T result = caseTemplateBinding(templateBinding); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.TEMPLATE_PARAMETER: { - TemplateParameter templateParameter = (TemplateParameter)theEObject; - T result = caseTemplateParameter(templateParameter); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.TEMPLATE_PARAMETER: { + TemplateParameter templateParameter = (TemplateParameter) theEObject; + T result = caseTemplateParameter(templateParameter); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.UNION: { - Union union = (Union)theEObject; - T result = caseUnion(union); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.UNION: { + Union union = (Union) theEObject; + T result = caseUnion(union); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.STORAGE_CLASS: { - StorageClass storageClass = (StorageClass)theEObject; - T result = caseStorageClass(storageClass); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.STORAGE_CLASS: { + StorageClass storageClass = (StorageClass) theEObject; + T result = caseStorageClass(storageClass); + if (result == null) { + result = defaultCase(theEObject); } - case C_CppPackage.VOLATILE: { - Volatile volatile_ = (Volatile)theEObject; - T result = caseVolatile(volatile_); - if (result == null) result = defaultCase(theEObject); - return result; + return result; + } + case C_CppPackage.VOLATILE: { + Volatile volatile_ = (Volatile) theEObject; + T result = caseVolatile(volatile_); + if (result == null) { + result = defaultCase(theEObject); } - default: return defaultCase(theEObject); + return result; + } + default: + return defaultCase(theEObject); } } @@ -224,7 +275,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Ptr</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -239,7 +292,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Include</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -254,7 +309,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Manual Generation</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -269,7 +326,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Extern Library</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -284,7 +343,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>No Code Gen</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -299,7 +360,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Cpp Root</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -314,7 +377,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Array</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -329,7 +394,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Const</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -344,7 +411,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Ref</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -359,7 +428,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>External</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -374,7 +445,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Const Init</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -389,7 +462,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Friend</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -404,7 +479,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Inline</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -419,7 +496,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Virtual</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -434,7 +513,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Typedef</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -449,7 +530,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Visibility</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -464,7 +547,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Cpp Init</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -479,7 +564,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Template</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -494,7 +581,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Template Binding</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -509,7 +598,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Template Parameter</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -524,7 +615,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Union</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -539,7 +632,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Storage Class</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -554,7 +649,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>Volatile</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated @@ -569,7 +666,9 @@ public class C_CppSwitch<T> extends Switch<T> { * This implementation returns null; * returning a non-null result will terminate the switch, but this is the last case anyway. * <!-- end-user-doc --> - * @param object the target of the switch. + * + * @param object + * the target of the switch. * @return the result of interpreting the object as an instance of '<em>EObject</em>'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated @@ -579,4 +678,4 @@ public class C_CppSwitch<T> extends Switch<T> { return null; } -} //C_CppSwitch +} // C_CppSwitch |