1 /*******************************************************************************
2 * Copyright (c) 2013 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 * Semantum Oy - initial API and implementation
12 *******************************************************************************/
13 package org.simantics.simulator.toolkit.db;
15 import org.simantics.db.layer0.variable.NodeSupport;
16 import org.simantics.simulator.toolkit.StandardNodeManager;
17 import org.simantics.simulator.toolkit.StandardNodeManagerSupport;
18 import org.simantics.simulator.toolkit.StandardRealm;
21 * Adds support for Layer0 Variable interface in StandardNodeManager
23 * @author Antti Villberg
25 public class StandardVariableNodeManager<Node, Engine extends StandardNodeManagerSupport<Node>> extends StandardNodeManager<Node,Engine> {
27 protected NodeSupport<Node> support;
29 public StandardVariableNodeManager(StandardRealm<Node, Engine> realm, Node root) {
31 this.support = new NodeSupport<>(this);
35 public void refreshVariable(Node node) {
36 super.refreshVariable(node);
37 support.valueCache.clearExpired();
38 support.structureCache.clearExpired();