public AllDataEnumerator(ImpalaStructure <T> structure, bool skipNulls) { this.structure = structure; nulls = skipNulls; branch = 0; item = -1; }
public override void SolveInstance(ImpalaAccess DA) { int[] branches = { 1, 2, 3, 4, 5 }; var paths = branches.Select(b => new GH_Path(b - 1)).ToArray(); var result = new ImpalaStructure <GH_Integer>(5, branches, paths); DA.SetDataTree(0, result); }
public bool SetDataTree <T>(int index, ImpalaStructure <T> tree) where T : class, IGH_Goo { if (index < 0 || index >= OutputCount) { throw new IndexOutOfRangeException(); } var param = (ImpalaParam <T>)Output(index); if (param == null) { return(false); } return(param.SetTree(tree)); }
// All this really needs to do is be able to get/set VolatileData from params. public bool GetTree <T>(int index, out ImpalaStructure <T> tree) where T : IGH_Goo { if (index < 0 || index >= InputCount) { throw new IndexOutOfRangeException(); } if (Input(index).Type != typeof(T)) { tree = null; return(false); } tree = (ImpalaStructure <T>)InputData[index]; return(tree != null); }
public bool SetTree(ImpalaStructure <T> tree) { return(false); }
public void Dispose() { structure = null; }