summaryrefslogtreecommitdiffstats
path: root/org.eclipse.ptp.pldt.mpi.analysis.cdt/src/org/eclipse/ptp/pldt/mpi/analysis/cdt/graphs/ICallGraphNode.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.ptp.pldt.mpi.analysis.cdt/src/org/eclipse/ptp/pldt/mpi/analysis/cdt/graphs/ICallGraphNode.java')
-rw-r--r--org.eclipse.ptp.pldt.mpi.analysis.cdt/src/org/eclipse/ptp/pldt/mpi/analysis/cdt/graphs/ICallGraphNode.java80
1 files changed, 80 insertions, 0 deletions
diff --git a/org.eclipse.ptp.pldt.mpi.analysis.cdt/src/org/eclipse/ptp/pldt/mpi/analysis/cdt/graphs/ICallGraphNode.java b/org.eclipse.ptp.pldt.mpi.analysis.cdt/src/org/eclipse/ptp/pldt/mpi/analysis/cdt/graphs/ICallGraphNode.java
new file mode 100644
index 0000000..3574662
--- /dev/null
+++ b/org.eclipse.ptp.pldt.mpi.analysis.cdt/src/org/eclipse/ptp/pldt/mpi/analysis/cdt/graphs/ICallGraphNode.java
@@ -0,0 +1,80 @@
+/**********************************************************************
+ * Copyright (c) 2007 IBM Corporation.
+ * 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:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.ptp.pldt.mpi.analysis.cdt.graphs;
+
+import java.util.List;
+
+import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
+import org.eclipse.core.resources.IResource;
+
+/**
+ * A call graph node corresponds to a user-defined function.
+ *
+ * @author Yuan Zhang
+ *
+ */
+public interface ICallGraphNode {
+
+ /**
+ * @return the function name
+ */
+ public String getFuncName();
+
+ /**
+ * @return the enclosing file name
+ */
+ public String getFileName();
+
+ public IResource getResource();
+
+ /**
+ * @return the function declaration
+ */
+ public IASTFunctionDefinition getFuncDef();
+
+ /**
+ * @return the set of functions that call this function
+ */
+ public List<ICallGraphNode> getCallers();
+ public void addCaller(ICallGraphNode caller);
+
+ /**
+ * @return the set of functions that are called by this function
+ */
+ public List<ICallGraphNode> getCallees();
+ public void addCallee(ICallGraphNode callee);
+
+ /**
+ * @return the control flow graph of this function
+ */
+ public IControlFlowGraph getCFG();
+ public void setCFG(IControlFlowGraph cfg);
+
+ /**
+ * @return the next function according to the topological order
+ */
+ public ICallGraphNode topNext();
+ public void setTopNext(ICallGraphNode node);
+
+ /**
+ * @return the next function according to the reverse topological order
+ */
+ public ICallGraphNode botNext();
+ public void setBotNext(ICallGraphNode node);
+
+ public void setAttr(String name, Object attr);
+ public Object getAttr(String name);
+ public void removeAttr(String name);
+
+ public void setRecursive(boolean val);
+ public boolean isRecursive();
+}