// Generated by Haxe 4.3.3
package graph;

import haxe.root.*;

@SuppressWarnings(value={"rawtypes", "unchecked"})
public class Positioner_placeNodes_54__Fun<T> extends haxe.lang.Function
{
	public Positioner_placeNodes_54__Fun(haxe.ds.List<java.lang.Object> queue, graph.Positioner<T> _gthis)
	{
		//line 54 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
		super(1, 0);
		//line 54 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
		this.queue = queue;
		//line 54 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
		this._gthis = _gthis;
	}
	
	
	@Override public java.lang.Object __hx_invoke1_o(double __fn_float1, java.lang.Object __fn_dyn1)
	{
		//line 54 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
		java.lang.Object sn = ( (( __fn_dyn1 == haxe.lang.Runtime.undefined )) ? (((java.lang.Object) (__fn_float1) )) : (((java.lang.Object) (__fn_dyn1) )) );
		//line 54 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
		if (( ! (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.lang.Runtime.getField(sn, "visited", true)) ))) )) 
		{
			//line 55 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
			this.queue.push(sn);
			//line 56 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
			this._gthis.placeNode(sn, this._gthis.getUnlinkedNodePos());
			//line 57 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
			while (( this.queue.length != 0 ))
			{
				//line 58 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
				java.lang.Object n = this.queue.pop();
				//line 59 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
				if (( ! (haxe.lang.Runtime.toBool(((java.lang.Boolean) (haxe.lang.Runtime.getField(n, "visited", true)) ))) )) 
				{
					//line 60 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
					haxe.lang.Runtime.setField(n, "visited", true);
					//line 61 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
					{
						//line 61 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
						int _g = 0;
						//line 61 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
						haxe.root.Array<java.lang.Object> _g1 = ((haxe.root.Array<java.lang.Object>) (haxe.lang.Runtime.getField(n, "links", true)) );
						//line 61 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
						while (( _g < _g1.length ))
						{
							//line 61 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
							java.lang.Object l = _g1.__get(_g);
							//line 61 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
							 ++ _g;
							//line 62 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
							this.queue.push(l);
						}
						
					}
					
					//line 64 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
					this._gthis.placeNodeNeighbours(n);
				}
				
			}
			
		}
		
		//line 54 "/home/frank/Documents/Developpements/dbconcept-0.5.1/src/graph/Positioner.hx"
		return null;
	}
	
	
	public haxe.ds.List<java.lang.Object> queue;
	
	public graph.Positioner<T> _gthis;
	
}


