Commit f7b6afd5 authored by Hafiz Muhammad Wahaj Aziz's avatar Hafiz Muhammad Wahaj Aziz
Browse files

New interface for FMU

refs 3055
parent d43ce9a2
/*--------------------------------------------------------------------------+
$Id$
| |
| Copyright 2017 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.cosimulation.compose;
import org.eclipse.emf.ecore.EObject;
import org.fortiss.af3.component.compose.BehaviorComponentCompositorBase;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.cosimulation.model.FMUSpecification;
/**
* Element compositor for {@link Component} and {@link FMUSpecification}.
*
* @author aziz
* @author $Author$
* @version $Rev$
* @ConQAT.Rating RED Hash:
*/
public class FMUSpecificationComponentCompositor extends BehaviorComponentCompositorBase<Component> {
/** {@inheritDoc} */
@Override
protected boolean isCorrectElementClass(EObject element) {
return element instanceof FMUSpecification;
}
}
/*--------------------------------------------------------------------------+
$Id$
| |
| Copyright 2017 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.cosimulation.model.impl;
import org.fortiss.af3.component.model.Component;
import org.fortiss.af3.cosimulation.model.FMUSpecification;
import org.fortiss.tooling.base.model.element.IModelElement;
/**
* Static implementation of {@link FMUSpecification}.
*
* @author aziz
* @author $Author$
* @version $Rev$
* @ConQAT.Rating RED Hash:
*/
public class FMUSpecificationStaticImpl {
/** Returns the target {@link Component}. */
public static Component getComponent(FMUSpecification fmuSpecification) {
IModelElement modelElement = fmuSpecification.getSpecificationOf();
return modelElement instanceof Component ? (Component)modelElement : null;
}
}
/*--------------------------------------------------------------------------+
$Id$
| |
| Copyright 2017 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.cosimulation.utils;
import org.fortiss.af3.cosimulation.model.AF3CosimulationFactory;
import org.fortiss.af3.cosimulation.model.FMUSpecification;
/**
* Utility methods for handling {@link FMUSpecification}s.
*
* @author aziz
* @author $Author$
* @version $Rev$
* @ConQAT.Rating RED Hash:
*/
public class FMUSpecificationUtils {
/** Creates a {@link FMUSpecification}. */
public static FMUSpecification createFMUSpecification() {
return AF3CosimulationFactory.eINSTANCE.createFMUSpecification();
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment