X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.modeling%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2FSCLComputationalValue.java;fp=bundles%2Forg.simantics.modeling%2Fsrc%2Forg%2Fsimantics%2Fmodeling%2FSCLComputationalValue.java;h=b64a4b809cd645f60931dc9064a7d854f89f81ab;hb=15f274a205dabc11df9bf880291320fa5274e535;hp=0000000000000000000000000000000000000000;hpb=9c7a45d78da0d2b99f3a365c39dfc3f2e7221e24;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.modeling/src/org/simantics/modeling/SCLComputationalValue.java b/bundles/org.simantics.modeling/src/org/simantics/modeling/SCLComputationalValue.java new file mode 100644 index 000000000..b64a4b809 --- /dev/null +++ b/bundles/org.simantics.modeling/src/org/simantics/modeling/SCLComputationalValue.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2018 Association for Decentralized Information Management in + * Industry THTH ry. + * 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: + * Semantum Oy - initial API and implementation + *******************************************************************************/ +package org.simantics.modeling; + +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.layer0.adapter.ContextualRelatedValue; +import org.simantics.scl.runtime.function.Function1; +import org.simantics.structural2.scl.CompileStructuralValueRequest; + +/** + * @author Antti Villberg + * @since 1.36.0 + */ +public class SCLComputationalValue extends ContextualRelatedValue { + + @Override + public Function1 getFunction(ReadGraph graph, Resource s, Resource o, Resource p) throws DatabaseException { + return CompileStructuralValueRequest.compile(graph, s, o, p); + } + +} \ No newline at end of file