Exemple #1
0
        /// <summary>
        /// Gets a string array of valid layers to pass to SetLayers, or an empty list if that method should not be called
        /// </summary>
        private List <string> GetLayerData()
        {
            var ret = new List <string>();
            var p   = _nyma.GetLayerData();

            if (p == null)
            {
                return(ret);
            }
            var q = p;

            while (true)
            {
                if (*q == 0)
                {
                    if (q > p)
                    {
                        ret.Add(Mershul.PtrToStringUtf8((IntPtr)p));
                    }
                    else
                    {
                        break;
                    }
                    p = q + 1;
                }
                q++;
            }
            return(ret);
        }