Пример #1
0
 public AllDataEnumerator(ImpalaStructure <T> structure, bool skipNulls)
 {
     this.structure = structure;
     nulls          = skipNulls;
     branch         = 0;
     item           = -1;
 }
Пример #2
0
        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);
        }
Пример #3
0
        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));
        }
Пример #4
0
        // 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);
        }
Пример #5
0
 public bool SetTree(ImpalaStructure <T> tree)
 {
     return(false);
 }
Пример #6
0
 public void Dispose()
 {
     structure = null;
 }