public BigChar GetBigChar(char charName)
        {
            var key = charName;

            BigChar bc;

            if (pool.ContainsKey(key))
            {
                bc = pool[key];
            }
            else
            {
                bc        = new BigChar(charName);
                pool[key] = bc;
            }

            return(bc);
        }
Beispiel #2
0
        public BigString(string str, bool shared = true)
        {
            bigChars = new BigChar[str.Length];

            if (shared)
            {
                var factory = BigCharFactory.GetInstance();

                for (var i = 0; i < bigChars.Length; i++)
                {
                    bigChars[i] = factory.GetBigChar(str[i]);
                }
            }
            else
            {
                for (var i = 0; i < bigChars.Length; i++)
                {
                    bigChars[i] = new BigChar(str[i]);
                }
            }
        }