Skip to content
Snippets Groups Projects
Commit 35145cdc authored by Florian Hölzl's avatar Florian Hölzl
Browse files

YELLOW.

parent 0a72c469
No related branches found
No related tags found
No related merge requests found
Showing
with 218 additions and 627 deletions
CanBusTransformation.java 96e04106bea67e1158a48b9a2e57e3513f3f1d43 YELLOW
CanBusTransmissionCatalogTransformation.java 1d1f72d107a59ddaefac42e38cdfa236f688eebc YELLOW
CanConnectorTransformation.java 9a573216bc5f3fa3c30e9a161d6f06bbc17ac09b YELLOW
CanConnectorTransmissionCatalogTransformation.java fa822114b375a2efdfa72c9c461099947519418d YELLOW
PWMActuatorTransformation.java 59001569f6c0b4596114ce9a63258ddb20b344d1 YELLOW
RasPiGeneratorTransformationBase.java dc2bd2ae0d0759234dc4ce7621034c888285b0df YELLOW
RaspberryPITransformation.java 8a3ae3ce9acf9b2a7bbf898b02668f3ac94fd435 YELLOW
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -19,42 +17,11 @@ package org.fortiss.af3.platform.raspberry.generator.transform;
import org.fortiss.af3.platform.raspberry.generator.executable.CanBusExecutable;
import org.fortiss.af3.platform.raspberry.model.CanBus;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation for {@link CanBus}.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class CanBusTransformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return CanBusExecutable.class;
/** Transformation for {@link CanBus}. */
public class CanBusTransformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected CanBusTransformation() {
super(CanBus.class, CanBusExecutable.class);
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return CanBus.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof CanBus;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new CanBusExecutable((CanBus)source);
}
}
/*--------------------------------------------------------------------------+
$Id: GenericTransmisstionUnitTransmissionCatalogTransformation.java 5274 2012-08-02 07:54:11Z mou $
| |
| Copyright 2011 ForTISS GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -25,16 +23,8 @@ import org.fortiss.af3.platform.raspberry.model.CanBus;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* {@link TransmissionCatalog} generator for {@link GenericTransmissionUnit}.
*
* @author hoelzl
* @author $Author: mou $
* @version $Rev: 5274 $
* @ConQAT.Rating GREEN Hash: C4318B1D240DC4CACC2BB0311CB2B23A
*/
/** {@link TransmissionCatalog} generator for {@link GenericTransmissionUnit}. */
public class CanBusTransmissionCatalogTransformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
......
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -19,42 +17,11 @@ package org.fortiss.af3.platform.raspberry.generator.transform;
import org.fortiss.af3.platform.raspberry.generator.executable.CanConnectorExecutable;
import org.fortiss.af3.platform.raspberry.model.CanConnector;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation for {@link CanConnector}.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class CanConnectorTransformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return CanConnectorExecutable.class;
/** Transformation for {@link CanConnector}. */
public class CanConnectorTransformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected CanConnectorTransformation() {
super(CanConnector.class, CanConnectorExecutable.class);
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return CanConnector.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof CanConnector;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new CanConnectorExecutable((CanConnector)source);
}
}
/*--------------------------------------------------------------------------+
$Id: GenericTransceiverTransmissionCatalogTransformation.java 5274 2012-08-02 07:54:11Z mou $
| |
| Copyright 2011 ForTISS GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -24,16 +22,8 @@ import org.fortiss.af3.platform.raspberry.model.CanConnector;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* {@link TransmissionCatalog} generator for {@link GenericTransceiver}.
*
* @author hoelzl
* @author $Author: mou $
* @version $Rev: 5274 $
* @ConQAT.Rating GREEN Hash: 99AE1800CB3BA900FDB2FD75FC254AD4
*/
/** {@link TransmissionCatalog} generator for {@link GenericTransceiver}. */
public class CanConnectorTransmissionCatalogTransformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
......
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -19,40 +17,11 @@ package org.fortiss.af3.platform.raspberry.generator.transform;
import org.fortiss.af3.platform.raspberry.generator.executable.PWMActuatorExecutable;
import org.fortiss.af3.platform.raspberry.model.ActuatorPWM;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation for {@link ActuatorPWM}.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class PWMActuatorTransformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return PWMActuatorExecutable.class;
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return ActuatorPWM.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof ActuatorPWM;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new PWMActuatorExecutable((ActuatorPWM)source);
/** Transformation for {@link ActuatorPWM}. */
public class PWMActuatorTransformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected PWMActuatorTransformation() {
super(ActuatorPWM.class, PWMActuatorExecutable.class);
}
}
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.transform;
import java.lang.reflect.Constructor;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.platform.language.executable.ExecutableBase;
import org.fortiss.af3.platform.raspberry.model.RaspberryPi;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
import org.fortiss.tooling.kernel.extension.exception.TransformationFailedException;
/**
* Base class for transformations from {@link RaspberryPi} model elements to executables.
*
* @author hoelzl
*/
public class RasPiGeneratorTransformationBase implements ITransformationProvider {
/** The model element class. */
private final Class<? extends EObject> modelElementClass;
/** The executable class. */
private final Class<? extends ExecutableBase<? extends EObject>> executableClass;
/** Constructor. */
protected RasPiGeneratorTransformationBase(Class<? extends EObject> modelElementClass,
Class<? extends ExecutableBase<? extends EObject>> executableClass) {
this.modelElementClass = modelElementClass;
this.executableClass = executableClass;
}
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return executableClass;
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return modelElementClass.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source != null && modelElementClass.isInstance(source);
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context)
throws TransformationFailedException {
try {
Constructor<? extends ExecutableBase<? extends EObject>> c =
executableClass.getConstructor(modelElementClass);
return c.newInstance(source);
} catch(Exception e) {
e.printStackTrace(System.err);
throw new TransformationFailedException(this, null, null);
}
}
}
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -19,42 +17,11 @@ package org.fortiss.af3.platform.raspberry.generator.transform;
import org.fortiss.af3.platform.raspberry.generator.executable.RaspberryPIExecutable;
import org.fortiss.af3.platform.raspberry.model.RaspberryPi;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation from {@link RaspberryPi} to {@link RaspberryPIExecutable}.
*
* @author eder
* @author $Author: eder $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class RaspberryPITransformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return RaspberryPIExecutable.class;
/** Transformation from {@link RaspberryPi} to {@link RaspberryPIExecutable}. */
public class RaspberryPITransformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected RaspberryPITransformation() {
super(RaspberryPi.class, RaspberryPIExecutable.class);
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return RaspberryPi.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof RaspberryPi;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new RaspberryPIExecutable((RaspberryPi)source);
}
}
Button1Transformation.java cf29ff3057bf1fb254309777b41dcb758241d44c YELLOW
Button2Transformation.java 52ce45a440a11617acf62ac39af48341876d179e YELLOW
Button3Transformation.java 55bdc4524c22f5f355e41a1be747fd14b471e762 YELLOW
Button4Transformation.java e02b53924f3e3132e2b9e795374643397a0f3832 YELLOW
ButtonL1Transformation.java 7f66bdfa131c62d777a0e9c26a3376532b46aa63 YELLOW
ButtonL2Transformation.java c7389248313c93796d68efa840b14f8379ca6af3 YELLOW
ButtonR1Transformation.java e387505188a77366419ac425df83dcf0dbc6a8a0 YELLOW
ButtonR2Transformation.java e209a1ca0aeb1e934ee739d44270b8d6f9856fdf YELLOW
Left_StickXTransformation.java b9572b80ff948dbd8357a6e5d3b8006f50ad327d YELLOW
Left_StickYTransformation.java e2a9262b8ccd4bff9bb273dec5867cf453fd0738 YELLOW
Right_StickXTransformation.java 514306b89d16bfa69852511ec42931ec5ff1b02c YELLOW
Right_StickYTransformation.java 42e7d9170087e4a766362c6aa36ade91d81056d2 YELLOW
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -18,43 +16,13 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
package org.fortiss.af3.platform.raspberry.generator.transform.gamepad;
import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button1Executable;
import org.fortiss.af3.platform.raspberry.generator.transform.RasPiGeneratorTransformationBase;
import org.fortiss.af3.platform.raspberry.model.gamepad.Button1;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation for {@link Button1}
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class Button1Transformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return Button1Executable.class;
/** Transformation for {@link Button1}. */
public class Button1Transformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected Button1Transformation() {
super(Button1.class, Button1Executable.class);
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return Button1.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof Button1;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new Button1Executable((Button1)source);
}
}
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -18,43 +16,13 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
package org.fortiss.af3.platform.raspberry.generator.transform.gamepad;
import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button2Executable;
import org.fortiss.af3.platform.raspberry.generator.transform.RasPiGeneratorTransformationBase;
import org.fortiss.af3.platform.raspberry.model.gamepad.Button2;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation for {@link Button2}.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class Button2Transformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return Button2Executable.class;
/** Transformation for {@link Button2}. */
public class Button2Transformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected Button2Transformation() {
super(Button2.class, Button2Executable.class);
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return Button2.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof Button2;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new Button2Executable((Button2)source);
}
}
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -18,43 +16,13 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
package org.fortiss.af3.platform.raspberry.generator.transform.gamepad;
import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button3Executable;
import org.fortiss.af3.platform.raspberry.generator.transform.RasPiGeneratorTransformationBase;
import org.fortiss.af3.platform.raspberry.model.gamepad.Button3;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation for {@link Button3}.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class Button3Transformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return Button3Executable.class;
/** Transformation for {@link Button3}. */
public class Button3Transformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected Button3Transformation() {
super(Button3.class, Button3Executable.class);
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return Button3.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof Button3;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new Button3Executable((Button3)source);
}
}
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -18,43 +16,13 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
package org.fortiss.af3.platform.raspberry.generator.transform.gamepad;
import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Button4Executable;
import org.fortiss.af3.platform.raspberry.generator.transform.RasPiGeneratorTransformationBase;
import org.fortiss.af3.platform.raspberry.model.gamepad.Button4;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation for {@link Button4}.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class Button4Transformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return Button4Executable.class;
/** Transformation for {@link Button4}. */
public class Button4Transformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected Button4Transformation() {
super(Button4.class, Button4Executable.class);
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return Button4.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof Button4;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new Button4Executable((Button4)source);
}
}
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -18,43 +16,13 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
package org.fortiss.af3.platform.raspberry.generator.transform.gamepad;
import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonL1Executable;
import org.fortiss.af3.platform.raspberry.generator.transform.RasPiGeneratorTransformationBase;
import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL1;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation for {@link ButtonL1}.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class ButtonL1Transformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return ButtonL1Executable.class;
/** Transformation for {@link ButtonL1}. */
public class ButtonL1Transformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected ButtonL1Transformation() {
super(ButtonL1.class, ButtonL1Executable.class);
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return ButtonL1.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof ButtonL1;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new ButtonL1Executable((ButtonL1)source);
}
}
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -18,43 +16,13 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
package org.fortiss.af3.platform.raspberry.generator.transform.gamepad;
import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonL2Executable;
import org.fortiss.af3.platform.raspberry.generator.transform.RasPiGeneratorTransformationBase;
import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL2;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation for {@link ButtonL2}.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class ButtonL2Transformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return ButtonL2Executable.class;
/** Transformation for {@link ButtonL2}. */
public class ButtonL2Transformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected ButtonL2Transformation() {
super(ButtonL2.class, ButtonL2Executable.class);
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return ButtonL2.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof ButtonL2;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new ButtonL2Executable((ButtonL2)source);
}
}
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -18,43 +16,13 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
package org.fortiss.af3.platform.raspberry.generator.transform.gamepad;
import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR1Executable;
import org.fortiss.af3.platform.raspberry.generator.transform.RasPiGeneratorTransformationBase;
import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonR1;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation for {@link ButtonR1}.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class ButtonR1Transformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return ButtonR1Executable.class;
/** Transformation for {@link ButtonR1}. */
public class ButtonR1Transformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected ButtonR1Transformation() {
super(ButtonR1.class, ButtonR1Executable.class);
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return ButtonR1.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof ButtonR1;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new ButtonR1Executable((ButtonR1)source);
}
}
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -18,43 +16,13 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
package org.fortiss.af3.platform.raspberry.generator.transform.gamepad;
import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable;
import org.fortiss.af3.platform.raspberry.generator.transform.RasPiGeneratorTransformationBase;
import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonR2;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation for {@link ButtonR2}.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class ButtonR2Transformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return ButtonR2Executable.class;
/** Transformation for {@link ButtonR2}. */
public class ButtonR2Transformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected ButtonR2Transformation() {
super(ButtonR2.class, ButtonR2Executable.class);
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return ButtonR2.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof ButtonR2;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new ButtonR2Executable((ButtonR2)source);
}
}
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -17,45 +15,14 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.transform.gamepad;
import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable;
import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Left_StickXExecutable;
import org.fortiss.af3.platform.raspberry.generator.transform.RasPiGeneratorTransformationBase;
import org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickX_Position;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation for {@link Left_StickX_Position}.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class Left_StickXTransformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return ButtonR2Executable.class;
/** Transformation for {@link Left_StickX_Position}. */
public class Left_StickXTransformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected Left_StickXTransformation() {
super(Left_StickX_Position.class, Left_StickXExecutable.class);
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return Left_StickX_Position.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof Left_StickX_Position;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new Left_StickXExecutable((Left_StickX_Position)source);
}
}
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -17,45 +15,14 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.transform.gamepad;
import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable;
import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Left_StickYExecutable;
import org.fortiss.af3.platform.raspberry.generator.transform.RasPiGeneratorTransformationBase;
import org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickY_Position;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation for {@link Left_StickY_Position}.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class Left_StickYTransformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return ButtonR2Executable.class;
/** Transformation for {@link Left_StickY_Position}. */
public class Left_StickYTransformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected Left_StickYTransformation() {
super(Left_StickY_Position.class, Left_StickYExecutable.class);
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return Left_StickY_Position.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof Left_StickY_Position;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new Left_StickYExecutable((Left_StickY_Position)source);
}
}
/*--------------------------------------------------------------------------+
$Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
| |
| Copyright 2017 fortiss GmbH |
/*-------------------------------------------------------------------------+
| Copyright 2018 fortiss GmbH |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
......@@ -17,45 +15,14 @@ $Id: codetemplates.xml 1 2011-01-01 00:00:01Z hoelzl $
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.raspberry.generator.transform.gamepad;
import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.ButtonR2Executable;
import org.fortiss.af3.platform.raspberry.generator.executable.gamepad.Right_StickXExecutable;
import org.fortiss.af3.platform.raspberry.generator.transform.RasPiGeneratorTransformationBase;
import org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickX_Position;
import org.fortiss.tooling.kernel.extension.ITransformationProvider;
import org.fortiss.tooling.kernel.extension.data.ITransformationContext;
/**
* Transformation for {@link Right_StickX_Position}.
*
* @author eder
* @author $Author: hoelzl $
* @version $Rev: 18709 $
* @ConQAT.Rating RED Hash:
*/
public class Right_StickXTransformation implements ITransformationProvider {
/** {@inheritDoc} */
@Override
public Class<?> getTargetClass() {
return ButtonR2Executable.class;
/** Transformation for {@link Right_StickX_Position}. */
public class Right_StickXTransformation extends RasPiGeneratorTransformationBase {
/** Constructor. */
protected Right_StickXTransformation() {
super(Right_StickX_Position.class, Right_StickXExecutable.class);
}
/** {@inheritDoc} */
@Override
public boolean
canHandleChainTransformation(Class<?> sourceClass, ITransformationContext context) {
return Right_StickX_Position.class.isAssignableFrom(sourceClass);
}
/** {@inheritDoc} */
@Override
public boolean canTransform(Object source, ITransformationContext context) {
return source instanceof Right_StickX_Position;
}
/** {@inheritDoc} */
@Override
public Object transform(Object source, ITransformationContext context) {
return new Right_StickXExecutable((Right_StickX_Position)source);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment