public void finegrainChange(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IGraph graph, GRGEN_LIBGR.IGraphElement elemCalledOn)
 {
     Console.WriteLine("finegrainChange called");
     ((GRGEN_LIBGR.ISubactionAndOutputAdditionEnvironment)actionEnv).Recorder.External("add foo bar to " + ((GRGEN_LIBGR.INamedGraph)graph).GetElementName(elemCalledOn));
     dummy.Add("foo","bar");
     ((GRGEN_LIBGR.IGraphProcessingEnvironment)actionEnv).TransactionManager.ExternalTypeChanged(new UndoDummy((GRGEN_MODEL.INB)elemCalledOn, "foo", graph));
 }
        public static bool ApplyXGRS_createEdge(GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv, GRGEN_LIBGR.INode var_n1, GRGEN_LIBGR.INode var_n2, ref GRGEN_LIBGR.IEdge var_e)
		{
			// it is recommended to create an edge as in the function below, immediately adding it to the graph
			// then you must work with LGSPNodes, casting the INodes you receive as parameters to that concrete type (inheriting from INode)
			var_e = GRGEN_MODEL.E.TypeInstance.CreateEdge(var_n1, var_n2);
			procEnv.graph.AddEdge(var_e); 
			return true;
		}
 public static object ParseImpl(TextReader reader, GRGEN_LIBGR.AttributeType attrType, GRGEN_LIBGR.IGraph graph)
 {
     char lookahead = (char)reader.Peek();
     if(lookahead == 'o')
     {
         reader.Read(); // eat 'o'
         return new Own();
     }
     else if(lookahead == 'p')
     {
         reader.Read(); // eat 'p'
         StringBuilder sb = new StringBuilder();
         while(reader.Peek() != ',' && reader.Peek() != ')') // attributes are separated by , a node/edge terminated by ) in .grs
             sb.Append((char)reader.Read()); // eat non ',', ')'
         OwnPown op = new OwnPown();
         op.ehe = sb.ToString();
         return op;
     }
     else if(lookahead == 'h')
     {
         reader.Read(); // eat 'h'
         StringBuilder sb = new StringBuilder();
         while(reader.Peek() != ';')
             sb.Append((char)reader.Read()); // eat non ';'
         string ehe = sb.ToString();
         sb.Length = 0;
         reader.Read(); // eat ';'
         while(reader.Peek() != ',' && reader.Peek() != ')') // attributes are separated by , a node/edge terminated by ) in .grs
             sb.Append((char)reader.Read()); // eat non ',',')'
         OwnPownHome oph = new OwnPownHome();
         oph.ehe = ehe;
         oph.aha = sb.ToString();
         return oph;
     }
     else
     {
         if(reader.Peek() == 'n')
         {
             reader.Read();
             if(reader.Peek() == 'u')
             {
                 reader.Read();
                 if(reader.Peek() == 'l')
                 {
                     reader.Read();
                     if(reader.Peek() == 'l')
                     {
                         reader.Read();
                         return null;
                     }
                 }
             }
         }
         throw new Exception("parsing failure");
     }
 }
		public override bool AreAttributesEqual(GRGEN_LIBGR.IGraphElement that) {
			if(!(that is D231_4121_Impl)) return false;
			D231_4121_Impl that_ = (D231_4121_Impl)that;
			return true
				&& a2_M0no_suXx_h4rD == that_.a2_M0no_suXx_h4rD
				&& b23_M0no_suXx_h4rD == that_.b23_M0no_suXx_h4rD
				&& a4_M0no_suXx_h4rD == that_.a4_M0no_suXx_h4rD
				&& b41_M0no_suXx_h4rD == that_.b41_M0no_suXx_h4rD
				&& b42_M0no_suXx_h4rD == that_.b42_M0no_suXx_h4rD
				&& a5_M0no_suXx_h4rD == that_.a5_M0no_suXx_h4rD
				&& d231_4121_M0no_suXx_h4rD == that_.d231_4121_M0no_suXx_h4rD
			;
		}
Beispiel #5
0
		public override bool AreAttributesEqual(GRGEN_LIBGR.IGraphElement that) {
			if(!(that is @Node)) return false;
			@Node that_ = (@Node)that;
			return true
			;
		}
		public override bool AreAttributesEqual(GRGEN_LIBGR.IGraphElement that) {
			if(!(that is @Expression)) return false;
			@Expression that_ = (@Expression)that;
			return true
			;
		}
Beispiel #7
0
		public override bool IsA(GRGEN_LIBGR.GrGenType other)
		{
			return (this == other) || isA[other.TypeID];
		}
Beispiel #8
0
		public void External(string line, GRGEN_LIBGR.IGraph graph)
		{
			Console.Write("Ignoring: ");
			Console.WriteLine(line);
		}
 public static bool ApplyXGRS_blo(GRGEN_LGSP.LGSPGraphProcessingEnvironment procEnv, GRGEN_LIBGR.INode var_v1, GRGEN_LIBGR.IEdge var_v2, ref GRGEN_LIBGR.INode var_r1, ref GRGEN_LIBGR.IEdge var_r2)
 {
     var_r1 = var_v1;
     var_r2 = var_v2;
     return true;
 }
Beispiel #10
0
		public void FillIndexSetAsClone(GRGEN_LIBGR.IGraph graph, GRGEN_LIBGR.IGraph originalGraph, IDictionary<GRGEN_LIBGR.IGraphElement, GRGEN_LIBGR.IGraphElement> oldToNewMap) {
			((StdIndexSet)((GRGEN_LGSP.LGSPGraph)graph).indices).FillAsClone((GRGEN_LGSP.LGSPGraph)originalGraph, oldToNewMap);
		}
Beispiel #11
0
		public string Serialize(object attribute, GRGEN_LIBGR.AttributeType attrType, GRGEN_LIBGR.IGraph graph)
		{
			Console.WriteLine("Warning: Exporting attribute of object type to null");
			return "null";
		}
Beispiel #12
0
		public override GRGEN_LIBGR.IEdge CreateEdge(GRGEN_LIBGR.INode source, GRGEN_LIBGR.INode target)
		{
			throw new Exception("The abstract edge type AEdge cannot be instantiated!");
		}
Beispiel #13
0
		public override void SetSourceAndTarget(GRGEN_LIBGR.IEdge edge, GRGEN_LIBGR.INode source, GRGEN_LIBGR.INode target)
		{
			throw new Exception("The abstract edge type AEdge does not support source and target setting!");
		}
		public static void externalProcedure(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IGraph graph)
		{
		}
Beispiel #15
0
		public override GRGEN_LIBGR.INode CreateNodeWithCopyCommons(GRGEN_LIBGR.INode oldINode)
		{
			return new GRGEN_MODEL.@Node();
		}
		public override object ApplyFunctionMethod(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IGraph graph, string name, object[] arguments)
		{
			switch(name)
			{
				default: throw new NullReferenceException("MethodSignature does not have the function method " + name + "!");
			}
		}
		public override GRGEN_LIBGR.INode CreateNodeWithCopyCommons(GRGEN_LIBGR.INode oldINode)
		{
			throw new Exception("Cannot retype to the abstract type Feature!");
		}
		public void CreateAndBindIndexSet(GRGEN_LIBGR.IGraph graph) {
			((GRGEN_LGSP.LGSPGraph)graph).indices = new ProgramGraphsOriginalIndexSet((GRGEN_LGSP.LGSPGraph)graph);
		}
Beispiel #19
0
		public override GRGEN_LIBGR.IEdge CreateEdgeWithCopyCommons(GRGEN_LIBGR.INode source, GRGEN_LIBGR.INode target, GRGEN_LIBGR.IEdge oldIEdge)
		{
			return new GRGEN_MODEL.@UEdge((GRGEN_LGSP.LGSPNode) source, (GRGEN_LGSP.LGSPNode) target);
		}
Beispiel #20
0
		public override GRGEN_LIBGR.IEdge CreateEdgeWithCopyCommons(GRGEN_LIBGR.INode source, GRGEN_LIBGR.INode target, GRGEN_LIBGR.IEdge oldIEdge)
		{
			throw new Exception("Cannot retype to the abstract type AEdge!");
		}
Beispiel #21
0
		public void CreateAndBindIndexSet(GRGEN_LIBGR.IGraph graph) {
			((GRGEN_LGSP.LGSPGraph)graph).indices = new StdIndexSet((GRGEN_LGSP.LGSPGraph)graph);
		}
Beispiel #22
0
		public override GRGEN_LIBGR.IEdge Clone(GRGEN_LIBGR.INode newSource, GRGEN_LIBGR.INode newTarget)
		{ return new GRGEN_MODEL.@UEdge(this, (GRGEN_LGSP.LGSPNode) newSource, (GRGEN_LGSP.LGSPNode) newTarget); }
Beispiel #23
0
		public object Parse(TextReader reader, GRGEN_LIBGR.AttributeType attrType, GRGEN_LIBGR.IGraph graph)
		{
			reader.Read(); reader.Read(); reader.Read(); reader.Read(); // eat 'n' 'u' 'l' 'l'
			return null;
		}
		public override bool AreAttributesEqual(GRGEN_LIBGR.IGraphElement that) {
			if(!(that is @methodBodyContains)) return false;
			@methodBodyContains that_ = (@methodBodyContains)that;
			return true
			;
		}
Beispiel #25
0
		public string Emit(object attribute, GRGEN_LIBGR.AttributeType attrType, GRGEN_LIBGR.IGraph graph)
		{
			return attribute!=null ? attribute.ToString() : "null";
		}
Beispiel #26
0
		public override GRGEN_LIBGR.IEdge CreateEdge(GRGEN_LIBGR.INode source, GRGEN_LIBGR.INode target)
		{
			return new GRGEN_MODEL.@UEdge((GRGEN_LGSP.LGSPNode) source, (GRGEN_LGSP.LGSPNode) target);
		}
Beispiel #27
0
		public GRGEN_LIBGR.INamedGraph AsGraph(object attribute, GRGEN_LIBGR.AttributeType attrType, GRGEN_LIBGR.IGraph graph)
		{
			return null;
		}
Beispiel #28
0
		public override void SetSourceAndTarget(GRGEN_LIBGR.IEdge edge, GRGEN_LIBGR.INode source, GRGEN_LIBGR.INode target)
		{
			((GRGEN_LGSP.LGSPEdge)edge).SetSourceAndTarget((GRGEN_LGSP.LGSPNode) source, (GRGEN_LGSP.LGSPNode) target);
		}
Beispiel #29
0
		public override object[] ApplyProcedureMethod(GRGEN_LIBGR.IActionExecutionEnvironment actionEnv, GRGEN_LIBGR.IGraph graph, string name, object[] arguments)
		{
			switch(name)
			{
				default: throw new NullReferenceException("UEdge does not have the procedure method " + name + "!");
			}
		}
		public override bool AreAttributesEqual(GRGEN_LIBGR.IGraphElement that) {
			if(!(that is @classContainsClass)) return false;
			@classContainsClass that_ = (@classContainsClass)that;
			return true
			;
		}